GFloating

Struct GFloating 

Source
pub struct GFloating(/* private fields */);
Expand description

§The VAX G_floating type.

§Reference Documentation

Here are excerpts from the VAX Architecture Reference Manual and the VAX MACRO and Instruction Set Reference Manual for the VAX G_floating floating-point type.

§VAX Architecture Reference Manual

The G_floating data type need not be supported in a subset implementation. A G_floating datum is 8 contiguous bytes starting on an arbitrary byte boundary. The bits are labeled from the right 〈0〉 through 〈63〉, as shown in Figure 1.2. A G_floating datum is specified by its address A, the address of the byte containing bit 〈0〉. The form of a G_floating datum is sign magnitude with bit 〈15〉, the sign bit; bits 〈14:4〉, an excess 1024 binary exponent; and bits 〈3:0〉 and 〈63:16〉, a normalized 53-bit fraction with the redundant most- significant fraction bit not represented. Within the fraction, bits of increasing significance are from 〈48〉 through 〈63〉, 〈32〉 through 〈47〉, 〈16〉 through 〈31〉, and 〈0〉 through 〈3〉. The 11-bit exponent field encodes the values 0 through 2047. An exponent value of 0 together with a sign bit of 0 is taken to indicate that the G_floating datum has a value of 0. Exponent values of 1 through 2047 indicate true binary exponents of -1023 through +1023. An exponent value of 0 together with a sign bit of 1 is taken as reserved. Floating-point instructions processing a reserved operand take a reserved operand fault (see Chapters 3 and 5). The value of a G_floating datum is in the approximate range .56*10-308 through .9*10308. The precision of a G_floating datum is approximately one part in 252, typically 15 decimal digits.

G_floating figure 1

§VAX MACRO and Instruction Set Reference Manual

A G_floating datum is 8 contiguous bytes starting on an arbitrary byte boundary. The bits are labeled from right to left 0 to 63.

G_floating figure 2

A G_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of a G_floating datum is sign magnitude, with bit 15 as the sign bit, bits 14:4 as an excess 1024 binary exponent, and bits 3:0 and 63:16 as a normalized 53-bit fraction with the redundant most-significant fraction bit not represented. Within the fraction, bits of increasing significance range from bits 48 to 63, 32 to 47, 16 to 31, and 0 to 3. The 11-bit exponent field encodes the values 0 to 2047. An exponent value of zero, together with a sign bit of zero, is taken to indicate that the G_floating datum has a value of zero. Exponent values of 1 to 2047 indicate true binary exponents of -1023 to +1023. An exponent value of zero, together with a sign bit of 1, is taken as reserved. Floating-point instructions processing a reserved operand take a reserved operand fault (see Appendix E). The value of a G_floating datum is in the approximate range .56*10**-308 to .9*10**308. The precision of a G_floating datum is approximately one part in 2**52; that is, typically 15 decimal digits.

§Bibliography

  • Bhandarkar, D. P., Conklin, P. F., Cutler, D. N., Eggers, T. W., Hastings, T. N., Hustvedt, R. I., Leonard, J. S., Lipman, P., Rarich, T., Rodgers, D. P., Rothman, S., Strecker, W. D., & Taylor, T. B. (1987). VAX Architecture Reference Manual (T. E. Leonard, Ed.). DECBooks.
  • Compaq Computer Corporation (2001). VAX MACRO and Instruction Set Reference Manual. Compaq Computer Corporation.

Implementations§

Source§

impl GFloating

Source

pub const RADIX: u32 = 2u32

The radix or base of the internal representation of GFloating.

Source

pub const MANTISSA_DIGITS: u32 = 53u32

Number of significant digits in base 2.

Source

pub const DIGITS: u32 = 15u32

Approximate number of significant digits in base 10.

Source

pub const EPSILON: GFloating

Machine epsilon value for GFloating.

This is the difference between 1.0 and the next larger representable number.

Source

pub const MIN: GFloating

Smallest finite GFloating value.

Source

pub const MIN_POSITIVE: GFloating

Smallest positive normal GFloating value.

Source

pub const MAX: GFloating

Largest finite GFloating value.

Source

pub const MIN_EXP: i32 = -1_023i32

One greater than the minimum possible normal power of 2 exponent.

Source

pub const MAX_EXP: i32 = 1_023i32

Maximum possible power of 2 exponent.

Source

pub const MIN_10_EXP: i32 = -308i32

Minimum possible normal power of 10 exponent.

Source

pub const MAX_10_EXP: i32 = 307i32

Maximum possible power of 10 exponent.

Source

pub const BITS: u32 = 64u32

The size of the VAX G_floating type in bits.

Source

pub const fn to_bits(self) -> u64

Raw transmutation from the GFloating type to u64.

§Examples
assert_eq!(GFloating::from_f32(0_f32).to_bits(), 0_u64);
assert_eq!(GFloating::from_f32(1.5).to_bits(), 0x0000000000004018_u64);
assert_eq!(GFloating::from_f32(12.5).to_bits(), 0x0000000000004049_u64);
Source

pub const fn from_bits(bits: u64) -> Self

Raw transmutation from a u64 the GFloating type.

§Examples
assert_eq!(GFloating::from_bits(0), GFloating::from_f32(0_f32));
assert_eq!(GFloating::from_bits(0x0000000000004018), GFloating::from_f32(1.5));
assert_eq!(GFloating::from_bits(0x0000000000004049), GFloating::from_f32(12.5));
Source

pub const fn to_le_bytes(&self) -> [u8; 8]

Return the memory representation of the GFloating type as a byte array in little-endian byte order.

§Examples
let bytes = GFloating::from_f32(12.5).to_le_bytes();
assert_eq!(bytes, [0x49, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
Source

pub const fn to_be_bytes(&self) -> [u8; 8]

Return the memory representation of the GFloating type as a byte array in big-endian (network) byte order.

§Examples
let bytes = GFloating::from_f32(12.5).to_be_bytes();
assert_eq!(bytes, [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x49]);
Source

pub const fn to_ne_bytes(&self) -> [u8; 8]

Return the memory representation of the GFloating type as a byte array in native byte order.

§Examples
let bytes = GFloating::from_f32(12.5).to_ne_bytes();
assert_eq!(
    bytes,
    if cfg!(target_endian = "big") {
   [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x49]
    } else {
   [0x49, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    }
);
Source

pub const fn from_le_bytes(bytes: [u8; 8]) -> Self

Create a GFloating type from its representation as a byte array in little endian.

§Examples
let float = GFloating::from_le_bytes([0x49, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
assert_eq!(float, GFloating::from_f32(12.5));
Source

pub const fn from_be_bytes(bytes: [u8; 8]) -> Self

Create a GFloating type from its representation as a byte array in big endian.

§Examples
let float = GFloating::from_be_bytes([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x49]);
assert_eq!(float, GFloating::from_f32(12.5));
Source

pub const fn from_ne_bytes(bytes: [u8; 8]) -> Self

Create a GFloating type from its representation as a byte array in native endianness.

§Examples
let float = GFloating::from_ne_bytes(
    if cfg!(target_endian = "big") {
   [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x49]
    } else {
   [0x49, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    }
);
assert_eq!(float, GFloating::from_f32(12.5));
Source

pub const fn to_swapped(self) -> u64

Reverses the (16-bit) word order of the raw transmutation of a u64 into the GFloating type.

§Examples
assert_eq!(GFloating::from_bits(0x0000000000004049).to_swapped(), 0x4049000000000000_u64);
assert_eq!(GFloating::from_f32(12.5).to_swapped(), 0x4049000000000000_u64);
Source

pub const fn from_swapped(swapped: u64) -> Self

Reverses the (16-bit) word order of the raw transmutation of the GFloating type into a u64.

§Examples
assert_eq!(GFloating::from_swapped(0x4049000000000000), GFloating::from_f32(12.5));
assert_eq!(GFloating::from_swapped(0x4049000000000000), GFloating::from_bits(0x0000000000004049));
Source

pub const fn signum(self) -> Self

Returns a number that represents the sign of self.

  • 1.0 if the number is positive, +0.0
  • -1.0 if the number is negative
  • Reserved if the number is Reserved
§Examples
const ONE: GFloating = GFloating::from_i8(1);
const NEG: GFloating = GFloating::from_i8(-1);
assert_eq!(GFloating::from_bits(0).signum(), ONE);
assert_eq!(GFloating::MIN_POSITIVE.signum(), ONE);
assert_eq!(GFloating::MAX.signum(), ONE);
assert_eq!(GFloating::MIN.signum(), NEG);
assert!(GFloating::from_bits(0x8000).signum().is_reserved());
Source

pub const fn is_zero(&self) -> bool

Return true if the GFloating is zero.

§Examples
assert_eq!(GFloating::from_bits(0).is_zero(), true);
assert_eq!(GFloating::MIN_POSITIVE.is_zero(), false);
assert_eq!(GFloating::MAX.is_zero(), false);
assert_eq!(GFloating::MIN.is_zero(), false);
// As long as the sign and exponent is zero, it is considered to be zero.
assert_eq!(GFloating::from_bits(0xFFFF0000_u64).is_zero(), true);
Source

pub const fn is_negative(&self) -> bool

Return true if the GFloating is negative.

§Examples
assert_eq!(GFloating::from_bits(0).is_negative(), false);
assert_eq!(GFloating::MIN_POSITIVE.is_negative(), false);
assert_eq!(GFloating::MAX.is_negative(), false);
assert_eq!(GFloating::MIN.is_negative(), true);
// All reserved values have the sign bit set, but are not negative.
assert_eq!(GFloating::from_bits(0x8000_u64).is_negative(), false);
Source

pub const fn is_reserved(&self) -> bool

Return true if the GFloating is reserved.

§Examples
assert_eq!(GFloating::from_bits(0).is_reserved(), false);
assert_eq!(GFloating::MIN_POSITIVE.is_reserved(), false);
assert_eq!(GFloating::MAX.is_reserved(), false);
assert_eq!(GFloating::MIN.is_reserved(), false);
// As long as the sign is negative and exponent is zero, it is considered reserved.
assert_eq!(GFloating::from_bits(0x8000_u64).is_reserved(), true);
assert_eq!(GFloating::from_bits(0xFFFF8000_u64).is_reserved(), true);
Source

pub const fn abs(self) -> Self

Force the sign of the GFloating to positive.

§Examples
for (case, abs) in [
    (0_f32, 0_f32), // Zero doesn't have a sign.
    (1.5, 1.5),    // Positive isn't changed.
    (-3.14, 3.14),  // Negative to positive.
    (-0.04, 0.04),  // Negative to positive.
].iter() {
    assert_eq!(GFloating::from_f32(*case).abs(), GFloating::from_f32(*abs));
}
Source

pub const fn negate(self) -> Self

Negate the sign of the GFloating value.

§Examples
for (case, neg) in [
    (0_f32, 0_f32), // Zero doesn't have a sign.
    (1.5, -1.5),    // Positive to negative.
    (-3.14, 3.14),  // Negative to positive.
].iter() {
    assert_eq!(GFloating::from_f32(*case).negate(), GFloating::from_f32(*neg));
}
Source

pub const fn sign(&self) -> Sign

Return the sign of the GFloating value.

§Examples
for (case, sign) in [
    (-0.0_f32, Sign::Positive),
    (1.5, Sign::Positive),
    (-3.14, Sign::Negative),
].iter() {
    assert_eq!(GFloating::from_f32(*case).sign(), *sign);
}
Source

pub const fn add_to(self, other: Self) -> Self

Add a GFloating to another GFloating.

§Examples
const NINETEEN_POINT_FIVE: GFloating = GFloating::from_u8(17).add_to(GFloating::from_f32(2.5));
let seventeen = GFloating::from_u8(17);
let two_point_five = GFloating::from_f32(2.5);
assert_eq!(seventeen + two_point_five, NINETEEN_POINT_FIVE);

This is the same as the addition (+) operator, except it can be used to define constants.

const NINETEEN_POINT_FIVE: GFloating = GFloating::from_u8(17) + GFloating::from_f32(2.5);
Source

pub const fn subtract_by(self, other: Self) -> Self

Subtract a GFloating from another GFloating.

§Examples
const FOURTEEN_POINT_FIVE: GFloating = GFloating::from_u8(17).subtract_by(GFloating::from_f32(2.5));
let seventeen = GFloating::from_u8(17);
let two_point_five = GFloating::from_f32(2.5);
assert_eq!(seventeen - two_point_five, FOURTEEN_POINT_FIVE);

This is the same as the subtraction (-) operator, except it can be used to define constants.

const FOURTEEN_POINT_FIVE: GFloating = GFloating::from_u8(17) - GFloating::from_f32(2.5);
Source

pub const fn multiply_by(self, multiplier: Self) -> Self

Multiply a GFloating by another GFloating.

§Examples
const SEVENTEEN_TIMES_TWENTY_THREE: GFloating = GFloating::from_u8(17).multiply_by(GFloating::from_u8(23));
let seventeen = GFloating::from_u8(17);
let twenty_three = GFloating::from_u8(23);
assert_eq!(seventeen * twenty_three, SEVENTEEN_TIMES_TWENTY_THREE);

This is the same as the multiplication (*) operator, except it can be used to define constants.

const SEVENTEEN_TIMES_TWENTY_THREE: GFloating = GFloating::from_u8(17) * GFloating::from_u8(23);
Source

pub const fn divide_by(self, divisor: Self) -> Self

Divide a GFloating by another GFloating.

§Examples
const TWENTY_TWO_SEVENTHS: GFloating = GFloating::from_u8(22).divide_by(GFloating::from_u8(7));
let twenty_two = GFloating::from_u8(22);
let seven = GFloating::from_u8(7);
assert_eq!(twenty_two / seven, TWENTY_TWO_SEVENTHS);

This is the same as the division (/) operator, except it can be used to define constants.

const TWENTY_TWO_SEVENTHS: GFloating = GFloating::from_u8(22) / GFloating::from_u8(7);
Source

pub const fn to_fp(&self) -> VaxFloatingPoint<u64>

Convert from a GFloating to a VaxFloatingPoint<u64>.

VaxFloatingPoint is used internally for performing mathmatical operations. Since the VaxFloatingPoint<u64> type has more precision (it uses the entireu64) and supports exponent values outside the range of the GFloating(G_floating) floating-point type, it may be useful for some calculations.

§Examples
const TWO: VaxFloatingPoint<u64> = GFloating::from_ascii("2").to_fp();
const THREE: VaxFloatingPoint<u64> = VaxFloatingPoint::<u64>::from_u8(3);
const TWO_THIRDS_MAX: GFloating = GFloating::MAX.divide_by(GFloating::from_u8(3)).multiply_by(GFloating::from_u8(2));
let fp = GFloating::MAX.to_fp();
let invalid = fp * TWO;
let two_thirds = invalid / THREE;
assert_eq!(GFloating::from_fp(two_thirds), TWO_THIRDS_MAX);
assert!(GFloating::from_fp(invalid).is_reserved());
Source

pub const fn from_fp(fp: VaxFloatingPoint<u64>) -> Self

Convert from a VaxFloatingPoint<u64> to a GFloating.

VaxFloatingPoint is used internally for performing mathmatical operations. Since the VaxFloatingPoint<u64> type has more precision (it uses the entireu64) and supports exponent values outside the range of the GFloating(G_floating) floating-point type, it may be useful for some calculations.

§Examples
const TWO: VaxFloatingPoint<u64> = GFloating::from_ascii("2").to_fp();
const THREE: VaxFloatingPoint<u64> = VaxFloatingPoint::<u64>::from_u8(3);
const TWO_THIRDS_MAX: GFloating = GFloating::MAX.divide_by(GFloating::from_u8(3)).multiply_by(GFloating::from_u8(2));
let fp = GFloating::MAX.to_fp();
let invalid = fp * TWO;
let two_thirds = invalid / THREE;
assert_eq!(GFloating::from_fp(two_thirds), TWO_THIRDS_MAX);
assert!(GFloating::from_fp(invalid).is_reserved());
Source

pub const fn from_ascii(text: &str) -> GFloating

Parse a string slice into a GFloating.

§Panics

This will panic if it fails to parse the string.

§Examples
const TWELVE_DOT_FIVE: GFloating = GFloating::from_ascii("12.5");
assert_eq!(GFloating::from_f32(12.5), TWELVE_DOT_FIVE);

Invalid input strings will fail to compile.

const TWO_DECIMAL_POINTS: GFloating = GFloating::from_ascii("..");

Unlike FromStr::from_str, from_ascii can be used to define constants.

const TWELVE_DOT_FIVE: GFloating = GFloating::from_str("12.5").unwrap();
Source

pub const fn unwrap(self) -> Self

Panic if the GFloating is not a valid value (i.e. reserved).

This should be used when defining constants to check for errors.

§Panics

Panics if the value is reserved (i.e. sign bit set with exponent value of zero).

§Examples
const TWELVE_DOT_FIVE: GFloating = GFloating::from_f32(12.5).unwrap();
assert_eq!(GFloating::from_f32(12.5), TWELVE_DOT_FIVE);
const OVERFLOW: GFloating = GFloating::MAX.add_to(GFloating::MAX).unwrap();
const DIV_BY_ZERO: GFloating = GFloating::MAX.divide_by(GFloating::from_bits(0));
// Without unwrap, sets constant to divide-by-zero encoded reserved value.
assert_eq!(GFloating::from_bits(0x8000), DIV_BY_ZERO);
const DIV_BY_ZERO: GFloating = GFloating::MAX.divide_by(GFloating::from_bits(0)).unwrap();
Source

pub const fn unwrap_or_default(self) -> Self

Return the defualt value if the GFloating is not valid (i.e. reserved).

§Examples
const TWELVE_DOT_FIVE: GFloating = GFloating::from_f32(12.5).unwrap_or_default();
assert_eq!(GFloating::from_f32(12.5), TWELVE_DOT_FIVE);

const OVERFLOW: GFloating = GFloating::MAX.add_to(GFloating::MAX).unwrap_or_default();
assert_eq!(GFloating::default(), OVERFLOW);
Source

pub const fn unwrap_or(self, default: Self) -> Self

Return an alternate value if the GFloating is not valid (i.e. reserved).

§Examples
const TWELVE_DOT_FIVE: GFloating = GFloating::from_f32(12.5).unwrap_or(GFloating::MAX);
assert_eq!(GFloating::from_f32(12.5), TWELVE_DOT_FIVE);

const OVERFLOW: GFloating = GFloating::MAX.add_to(GFloating::MAX).unwrap_or(GFloating::MAX);
assert_eq!(GFloating::MAX, OVERFLOW);
Source

pub fn unwrap_or_else<F: FnOnce(Self) -> Self>(self, op: F) -> Self

Returns the result from a closure if the GFloating is not valid (i.e. reserved).

This is included for completeness, but it isn’t const like the other unwrap functions.

§Examples
use vax_floating::Result;
fn saturate_float(float: GFloating) -> GFloating {
    use vax_floating::Error::*;
    match <Result<GFloating>>::from(float) {
        Ok(float) => float,
        Err(Overflow(_)) | Err(DivByZero) => GFloating::MAX,
        Err(Underflow(_)) => GFloating::MIN_POSITIVE,
        Err(_) => GFloating::MIN,
    }
}

let twelve_dot_five: GFloating = GFloating::from_f32(12.5).unwrap_or_else(saturate_float);
assert_eq!(GFloating::from_f32(12.5), twelve_dot_five);

let overflow: GFloating = GFloating::MAX.add_to(GFloating::MAX).unwrap_or_else(saturate_float);
assert_eq!(GFloating::MAX, overflow);
Source

pub const fn from_u8(src: u8) -> Self

Convert from u8 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_u8(0_u8);
const TEN: GFloating = GFloating::from_u8(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<u8> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_u8);
Source

pub const fn from_i8(src: i8) -> Self

Convert from i8 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_i8(0_i8);
const TEN: GFloating = GFloating::from_i8(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<i8> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_i8);
Source

pub const fn from_u16(src: u16) -> Self

Convert from u16 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_u16(0_u16);
const TEN: GFloating = GFloating::from_u16(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<u16> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_u16);
Source

pub const fn from_i16(src: i16) -> Self

Convert from i16 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_i16(0_i16);
const TEN: GFloating = GFloating::from_i16(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<i16> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_i16);
Source

pub const fn from_u32(src: u32) -> Self

Convert from u32 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_u32(0_u32);
const TEN: GFloating = GFloating::from_u32(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<u32> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_u32);
Source

pub const fn from_i32(src: i32) -> Self

Convert from i32 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_i32(0_i32);
const TEN: GFloating = GFloating::from_i32(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<i32> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_i32);
Source

pub const fn from_u64(src: u64) -> Self

Convert from u64 to a GFloating.

Can be used to define constants.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

§Examples
const ZERO: GFloating = GFloating::from_u64(0_u64);
const TEN: GFloating = GFloating::from_u64(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<u64> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_u64);
Source

pub const fn from_i64(src: i64) -> Self

Convert from i64 to a GFloating.

Can be used to define constants.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

§Examples
const ZERO: GFloating = GFloating::from_i64(0_i64);
const TEN: GFloating = GFloating::from_i64(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<i64> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_i64);
Source

pub const fn from_usize(src: usize) -> Self

Convert from usize to a GFloating.

Can be used to define constants.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

§Examples
const ZERO: GFloating = GFloating::from_usize(0_usize);
const TEN: GFloating = GFloating::from_usize(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<usize> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_usize);
Source

pub const fn from_isize(src: isize) -> Self

Convert from isize to a GFloating.

Can be used to define constants.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

§Examples
const ZERO: GFloating = GFloating::from_isize(0_isize);
const TEN: GFloating = GFloating::from_isize(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<isize> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_isize);
Source

pub const fn from_u128(src: u128) -> Self

Convert from u128 to a GFloating.

Can be used to define constants.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

§Examples
const ZERO: GFloating = GFloating::from_u128(0_u128);
const TEN: GFloating = GFloating::from_u128(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<u128> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_u128);
Source

pub const fn from_i128(src: i128) -> Self

Convert from i128 to a GFloating.

Can be used to define constants.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

§Examples
const ZERO: GFloating = GFloating::from_i128(0_i128);
const TEN: GFloating = GFloating::from_i128(10);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004044), TEN);

From<i128> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_i128);
Source

pub const fn from_f32(src: f32) -> Self

Convert from f32 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_f32(0_f32);
const THREE_HALVES: GFloating = GFloating::from_f32(1.5);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004018), THREE_HALVES);

From<f32> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_f32);
Source

pub const fn to_f32(&self) -> f32

Convert from a GFloating to f32.

Can be used to define constants.

§Examples
const ZERO: f32 = GFloating::from_bits(0).to_f32();
const THREE_HALVES: f32 = GFloating::from_bits(0x0000000000004018).to_f32();
assert_eq!(ZERO, 0.0_f32);
assert_eq!(THREE_HALVES, 1.5_f32);
assert_eq!(GFloating::from_bits(0x0000000000004018).to_f32(), 1.5_f32);

From<GFloating> cannot be used to define constants.

const ZERO: f32 = f32::from(GFloating::from_bits(0));
Source

pub const fn from_f64(src: f64) -> Self

Convert from f64 to a GFloating.

Can be used to define constants.

§Examples
const ZERO: GFloating = GFloating::from_f64(0_f64);
const THREE_HALVES: GFloating = GFloating::from_f64(1.5);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004018), THREE_HALVES);

From<f64> cannot be used to define constants.

const ZERO: GFloating = GFloating::from(0_f64);
Source

pub const fn to_f64(&self) -> f64

Convert from a GFloating to f64.

Can be used to define constants.

§Examples
const ZERO: f64 = GFloating::from_bits(0).to_f64();
const THREE_HALVES: f64 = GFloating::from_bits(0x0000000000004018).to_f64();
assert_eq!(ZERO, 0.0_f64);
assert_eq!(THREE_HALVES, 1.5_f64);
assert_eq!(GFloating::from_bits(0x0000000000004018).to_f64(), 1.5_f64);

From<GFloating> cannot be used to define constants.

const ZERO: f64 = f64::from(GFloating::from_bits(0));
Source

pub const fn from_f_floating(src: FFloating) -> Self

Convert from FFloating to a GFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: FFloating = FFloating::from_bits(0);
const FROM_THREE_HALVES: FFloating = FFloating::from_f32(1.5);
const ZERO: GFloating = GFloating::from_f_floating(FROM_ZERO);
const THREE_HALVES: GFloating = GFloating::from_f_floating(FROM_THREE_HALVES);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004018), THREE_HALVES);

From<FFloating> cannot be used to define constants.

const FROM_ZERO: FFloating = FFloating::from_bits(0);
const ZERO: GFloating = GFloating::from(FROM_ZERO);
Source

pub const fn to_f_floating(&self) -> FFloating

Convert from a GFloating to FFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: GFloating = GFloating::from_bits(0);
const FROM_THREE_HALVES: GFloating = GFloating::from_bits(0x0000000000004018);
const ZERO: FFloating = FROM_ZERO.to_f_floating();
const THREE_HALVES: FFloating = FROM_THREE_HALVES.to_f_floating();
assert_eq!(ZERO, FFloating::from_bits(0));
assert_eq!(THREE_HALVES, FFloating::from_f32(1.5));

From<GFloating> cannot be used to define constants.

const FROM_ZERO: GFloating = GFloating::from_bits(0);
const ZERO: FFloating = FFloating::from(FROM_ZERO);
Source

pub const fn from_d_floating(src: DFloating) -> Self

Convert from DFloating to a GFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: DFloating = DFloating::from_bits(0);
const FROM_THREE_HALVES: DFloating = DFloating::from_f32(1.5);
const ZERO: GFloating = GFloating::from_d_floating(FROM_ZERO);
const THREE_HALVES: GFloating = GFloating::from_d_floating(FROM_THREE_HALVES);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004018), THREE_HALVES);

From<DFloating> cannot be used to define constants.

const FROM_ZERO: DFloating = DFloating::from_bits(0);
const ZERO: GFloating = GFloating::from(FROM_ZERO);
Source

pub const fn to_d_floating(&self) -> DFloating

Convert from a GFloating to DFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: GFloating = GFloating::from_bits(0);
const FROM_THREE_HALVES: GFloating = GFloating::from_bits(0x0000000000004018);
const ZERO: DFloating = FROM_ZERO.to_d_floating();
const THREE_HALVES: DFloating = FROM_THREE_HALVES.to_d_floating();
assert_eq!(ZERO, DFloating::from_bits(0));
assert_eq!(THREE_HALVES, DFloating::from_f32(1.5));

From<GFloating> cannot be used to define constants.

const FROM_ZERO: GFloating = GFloating::from_bits(0);
const ZERO: DFloating = DFloating::from(FROM_ZERO);
Source

pub const fn from_g_floating(src: GFloating) -> Self

Convert from GFloating to a GFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: GFloating = GFloating::from_bits(0);
const FROM_THREE_HALVES: GFloating = GFloating::from_f32(1.5);
const ZERO: GFloating = GFloating::from_g_floating(FROM_ZERO);
const THREE_HALVES: GFloating = GFloating::from_g_floating(FROM_THREE_HALVES);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004018), THREE_HALVES);

From<GFloating> cannot be used to define constants.

const FROM_ZERO: GFloating = GFloating::from_bits(0);
const ZERO: GFloating = GFloating::from(FROM_ZERO);
Source

pub const fn to_g_floating(&self) -> GFloating

Convert from a GFloating to GFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: GFloating = GFloating::from_bits(0);
const FROM_THREE_HALVES: GFloating = GFloating::from_bits(0x0000000000004018);
const ZERO: GFloating = FROM_ZERO.to_g_floating();
const THREE_HALVES: GFloating = FROM_THREE_HALVES.to_g_floating();
assert_eq!(ZERO, GFloating::from_bits(0));
assert_eq!(THREE_HALVES, GFloating::from_f32(1.5));

From<GFloating> cannot be used to define constants.

const FROM_ZERO: GFloating = GFloating::from_bits(0);
const ZERO: GFloating = GFloating::from(FROM_ZERO);
Source

pub const fn from_h_floating(src: HFloating) -> Self

Convert from HFloating to a GFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: HFloating = HFloating::from_bits(0);
const FROM_THREE_HALVES: HFloating = HFloating::from_f32(1.5);
const ZERO: GFloating = GFloating::from_h_floating(FROM_ZERO);
const THREE_HALVES: GFloating = GFloating::from_h_floating(FROM_THREE_HALVES);
assert_eq!(GFloating::from_bits(0), ZERO);
assert_eq!(GFloating::from_bits(0x0000000000004018), THREE_HALVES);

From<HFloating> cannot be used to define constants.

const FROM_ZERO: HFloating = HFloating::from_bits(0);
const ZERO: GFloating = GFloating::from(FROM_ZERO);
Source

pub const fn to_h_floating(&self) -> HFloating

Convert from a GFloating to HFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: GFloating = GFloating::from_bits(0);
const FROM_THREE_HALVES: GFloating = GFloating::from_bits(0x0000000000004018);
const ZERO: HFloating = FROM_ZERO.to_h_floating();
const THREE_HALVES: HFloating = FROM_THREE_HALVES.to_h_floating();
assert_eq!(ZERO, HFloating::from_bits(0));
assert_eq!(THREE_HALVES, HFloating::from_f32(1.5));

From<GFloating> cannot be used to define constants.

const FROM_ZERO: GFloating = GFloating::from_bits(0);
const ZERO: HFloating = HFloating::from(FROM_ZERO);

Trait Implementations§

Source§

impl Add<&GFloating> for &GFloating

Source§

type Output = <GFloating as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &GFloating) -> <GFloating as Add<GFloating>>::Output

Performs the + operation. Read more
Source§

impl Add<&GFloating> for GFloating

Source§

type Output = <GFloating as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &GFloating) -> <GFloating as Add<GFloating>>::Output

Performs the + operation. Read more
Source§

impl<'a> Add<GFloating> for &'a GFloating

Source§

type Output = <GFloating as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: GFloating) -> <GFloating as Add<GFloating>>::Output

Performs the + operation. Read more
Source§

impl Add for GFloating

Source§

type Output = GFloating

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<&GFloating> for GFloating

Source§

fn add_assign(&mut self, other: &GFloating)

Performs the += operation. Read more
Source§

impl AddAssign for GFloating

Source§

fn add_assign(&mut self, other: GFloating)

Performs the += operation. Read more
Source§

impl Clone for GFloating

Source§

fn clone(&self) -> GFloating

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GFloating

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GFloating

Source§

fn default() -> GFloating

Returns the “default value” for a type. Read more
Source§

impl Display for GFloating

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<&GFloating> for &GFloating

Source§

type Output = <GFloating as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &GFloating) -> <GFloating as Div<GFloating>>::Output

Performs the / operation. Read more
Source§

impl Div<&GFloating> for GFloating

Source§

type Output = <GFloating as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &GFloating) -> <GFloating as Div<GFloating>>::Output

Performs the / operation. Read more
Source§

impl<'a> Div<GFloating> for &'a GFloating

Source§

type Output = <GFloating as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: GFloating) -> <GFloating as Div<GFloating>>::Output

Performs the / operation. Read more
Source§

impl Div for GFloating

Source§

type Output = GFloating

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<&GFloating> for GFloating

Source§

fn div_assign(&mut self, other: &GFloating)

Performs the /= operation. Read more
Source§

impl DivAssign for GFloating

Source§

fn div_assign(&mut self, other: GFloating)

Performs the /= operation. Read more
Source§

impl From<&DFloating> for GFloating

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&FFloating> for GFloating

Source§

fn from(src: &FFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&GFloating> for DFloating

Source§

fn from(src: &GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&GFloating> for FFloating

Source§

fn from(src: &GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&GFloating> for HFloating

Source§

fn from(src: &GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&GFloating> for f32

Source§

fn from(src: &GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&GFloating> for f64

Source§

fn from(src: &GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&HFloating> for GFloating

Source§

fn from(src: &HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&f32> for GFloating

Source§

fn from(src: &f32) -> Self

Converts to this type from the input type.
Source§

impl From<&f64> for GFloating

Source§

fn from(src: &f64) -> Self

Converts to this type from the input type.
Source§

impl From<&i128> for GFloating

Source§

fn from(src: &i128) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&i16> for GFloating

Source§

fn from(src: &i16) -> Self

Converts to this type from the input type.

Source§

impl From<&i32> for GFloating

Source§

fn from(src: &i32) -> Self

Converts to this type from the input type.

Source§

impl From<&i64> for GFloating

Source§

fn from(src: &i64) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&i8> for GFloating

Source§

fn from(src: &i8) -> Self

Converts to this type from the input type.

Source§

impl From<&isize> for GFloating

Source§

fn from(src: &isize) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&u128> for GFloating

Source§

fn from(src: &u128) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&u16> for GFloating

Source§

fn from(src: &u16) -> Self

Converts to this type from the input type.

Source§

impl From<&u32> for GFloating

Source§

fn from(src: &u32) -> Self

Converts to this type from the input type.

Source§

impl From<&u64> for GFloating

Source§

fn from(src: &u64) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&u8> for GFloating

Source§

fn from(src: &u8) -> Self

Converts to this type from the input type.

Source§

impl From<&usize> for GFloating

Source§

fn from(src: &usize) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<DFloating> for GFloating

Source§

fn from(src: DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<FFloating> for GFloating

Source§

fn from(src: FFloating) -> Self

Converts to this type from the input type.
Source§

impl From<GFloating> for DFloating

Source§

fn from(src: GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<GFloating> for FFloating

Source§

fn from(src: GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<GFloating> for HFloating

Source§

fn from(src: GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<GFloating> for Result<GFloating>

Source§

fn from(float: GFloating) -> Result<GFloating>

Converts to this type from the input type.
Source§

impl From<GFloating> for f32

Source§

fn from(src: GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<GFloating> for f64

Source§

fn from(src: GFloating) -> Self

Converts to this type from the input type.
Source§

impl From<HFloating> for GFloating

Source§

fn from(src: HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<Result<GFloating, Error>> for GFloating

Source§

fn from(result: Result<GFloating>) -> GFloating

Converts to this type from the input type.
Source§

impl From<f32> for GFloating

Source§

fn from(src: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for GFloating

Source§

fn from(src: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for GFloating

Source§

fn from(src: i128) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<i16> for GFloating

Source§

fn from(src: i16) -> Self

Converts to this type from the input type.

Source§

impl From<i32> for GFloating

Source§

fn from(src: i32) -> Self

Converts to this type from the input type.

Source§

impl From<i64> for GFloating

Source§

fn from(src: i64) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<i8> for GFloating

Source§

fn from(src: i8) -> Self

Converts to this type from the input type.

Source§

impl From<isize> for GFloating

Source§

fn from(src: isize) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<u128> for GFloating

Source§

fn from(src: u128) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<u16> for GFloating

Source§

fn from(src: u16) -> Self

Converts to this type from the input type.

Source§

impl From<u32> for GFloating

Source§

fn from(src: u32) -> Self

Converts to this type from the input type.

Source§

impl From<u64> for GFloating

Source§

fn from(src: u64) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<u8> for GFloating

Source§

fn from(src: u8) -> Self

Converts to this type from the input type.

Source§

impl From<usize> for GFloating

Source§

fn from(src: usize) -> Self

Converts to this type from the input type.

Note: Only the most significant set bits that fit into the number of GFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl FromStr for GFloating

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<GFloating>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for GFloating

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl LowerExp for GFloating

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Mul<&GFloating> for &GFloating

Source§

type Output = <GFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &GFloating) -> <GFloating as Mul<GFloating>>::Output

Performs the * operation. Read more
Source§

impl Mul<&GFloating> for GFloating

Source§

type Output = <GFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &GFloating) -> <GFloating as Mul<GFloating>>::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<GFloating> for &'a GFloating

Source§

type Output = <GFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: GFloating) -> <GFloating as Mul<GFloating>>::Output

Performs the * operation. Read more
Source§

impl Mul for GFloating

Source§

type Output = GFloating

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<&GFloating> for GFloating

Source§

fn mul_assign(&mut self, other: &GFloating)

Performs the *= operation. Read more
Source§

impl MulAssign for GFloating

Source§

fn mul_assign(&mut self, other: GFloating)

Performs the *= operation. Read more
Source§

impl Neg for &GFloating

Source§

type Output = <GFloating as Neg>::Output

The resulting type after applying the - operator.
Source§

fn neg(self) -> <GFloating as Neg>::Output

Performs the unary - operation. Read more
Source§

impl Neg for GFloating

Source§

type Output = GFloating

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for GFloating

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for GFloating

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Shl<&i32> for &GFloating

Source§

type Output = <GFloating as Shl<i32>>::Output

The resulting type after applying the << operator.
Source§

fn shl(self, other: &i32) -> <GFloating as Shl<i32>>::Output

Performs the << operation. Read more
Source§

impl Shl<&i32> for GFloating

Source§

type Output = <GFloating as Shl<i32>>::Output

The resulting type after applying the << operator.
Source§

fn shl(self, other: &i32) -> <GFloating as Shl<i32>>::Output

Performs the << operation. Read more
Source§

impl Shl<&u32> for &GFloating

Source§

type Output = <GFloating as Shl<u32>>::Output

The resulting type after applying the << operator.
Source§

fn shl(self, other: &u32) -> <GFloating as Shl<u32>>::Output

Performs the << operation. Read more
Source§

impl Shl<&u32> for GFloating

Source§

type Output = <GFloating as Shl<u32>>::Output

The resulting type after applying the << operator.
Source§

fn shl(self, other: &u32) -> <GFloating as Shl<u32>>::Output

Performs the << operation. Read more
Source§

impl<'a> Shl<i32> for &'a GFloating

Source§

type Output = <GFloating as Shl<i32>>::Output

The resulting type after applying the << operator.
Source§

fn shl(self, other: i32) -> <GFloating as Shl<i32>>::Output

Performs the << operation. Read more
Source§

impl Shl<i32> for GFloating

Source§

type Output = GFloating

The resulting type after applying the << operator.
Source§

fn shl(self, other: i32) -> GFloating

Performs the << operation. Read more
Source§

impl<'a> Shl<u32> for &'a GFloating

Source§

type Output = <GFloating as Shl<u32>>::Output

The resulting type after applying the << operator.
Source§

fn shl(self, other: u32) -> <GFloating as Shl<u32>>::Output

Performs the << operation. Read more
Source§

impl Shl<u32> for GFloating

Source§

type Output = GFloating

The resulting type after applying the << operator.
Source§

fn shl(self, other: u32) -> GFloating

Performs the << operation. Read more
Source§

impl ShlAssign<&u32> for GFloating

Source§

fn shl_assign(&mut self, other: &u32)

Performs the <<= operation. Read more
Source§

impl ShlAssign<u32> for GFloating

Source§

fn shl_assign(&mut self, other: u32)

Performs the <<= operation. Read more
Source§

impl Shr<&i32> for &GFloating

Source§

type Output = <GFloating as Shr<i32>>::Output

The resulting type after applying the >> operator.
Source§

fn shr(self, other: &i32) -> <GFloating as Shr<i32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<&i32> for GFloating

Source§

type Output = <GFloating as Shr<i32>>::Output

The resulting type after applying the >> operator.
Source§

fn shr(self, other: &i32) -> <GFloating as Shr<i32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<&u32> for &GFloating

Source§

type Output = <GFloating as Shr<u32>>::Output

The resulting type after applying the >> operator.
Source§

fn shr(self, other: &u32) -> <GFloating as Shr<u32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<&u32> for GFloating

Source§

type Output = <GFloating as Shr<u32>>::Output

The resulting type after applying the >> operator.
Source§

fn shr(self, other: &u32) -> <GFloating as Shr<u32>>::Output

Performs the >> operation. Read more
Source§

impl<'a> Shr<i32> for &'a GFloating

Source§

type Output = <GFloating as Shr<i32>>::Output

The resulting type after applying the >> operator.
Source§

fn shr(self, other: i32) -> <GFloating as Shr<i32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<i32> for GFloating

Source§

type Output = GFloating

The resulting type after applying the >> operator.
Source§

fn shr(self, other: i32) -> GFloating

Performs the >> operation. Read more
Source§

impl<'a> Shr<u32> for &'a GFloating

Source§

type Output = <GFloating as Shr<u32>>::Output

The resulting type after applying the >> operator.
Source§

fn shr(self, other: u32) -> <GFloating as Shr<u32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<u32> for GFloating

Source§

type Output = GFloating

The resulting type after applying the >> operator.
Source§

fn shr(self, other: u32) -> GFloating

Performs the >> operation. Read more
Source§

impl ShrAssign<&u32> for GFloating

Source§

fn shr_assign(&mut self, other: &u32)

Performs the >>= operation. Read more
Source§

impl ShrAssign<u32> for GFloating

Source§

fn shr_assign(&mut self, other: u32)

Performs the >>= operation. Read more
Source§

impl Sub<&GFloating> for &GFloating

Source§

type Output = <GFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &GFloating) -> <GFloating as Sub<GFloating>>::Output

Performs the - operation. Read more
Source§

impl Sub<&GFloating> for GFloating

Source§

type Output = <GFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &GFloating) -> <GFloating as Sub<GFloating>>::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<GFloating> for &'a GFloating

Source§

type Output = <GFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: GFloating) -> <GFloating as Sub<GFloating>>::Output

Performs the - operation. Read more
Source§

impl Sub for GFloating

Source§

type Output = GFloating

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<&GFloating> for GFloating

Source§

fn sub_assign(&mut self, other: &GFloating)

Performs the -= operation. Read more
Source§

impl SubAssign for GFloating

Source§

fn sub_assign(&mut self, other: GFloating)

Performs the -= operation. Read more
Source§

impl UpperExp for GFloating

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for GFloating

Source§

impl Eq for GFloating

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.