DFloating

Struct DFloating 

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

§The VAX D_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 D_floating floating-point type.

§VAX Architecture Reference Manual

This data type need not be supported in a subset implementation. A D_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 D_floating datum is specified by its address A, the address of the byte containing bit 〈0〉. The form of a D_floating datum is identical to a floating datum except for an additional 32 low- significance fraction bits. Within the fraction, bits of increasing significance are from 〈48〉 through 〈63〉, 〈32〉 through 〈47〉, 〈16〉 through 〈31〉, and 〈0〉 through 〈6〉. The exponent conventions and approximate range of values is the same for D_floating as for F_floating. The precision of a D_floating datum is approximately one part in 255, typically 16 decimal digits.

D_floating figure 1

§VAX MACRO and Instruction Set Reference Manual

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

D_floating figure 2

A D_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of a D_floating datum is identical to an F_floating datum except for additional 32 low-significance fraction bits. Within the fraction, bits of increasing significance range from bits 48 to 63, 32 to 47, 16 to 31, and 0 to 6. The exponent conventions and the approximate range of values are the same for D_floating as they are for F_floating. The precision of a D_floating datum is approximately one part in 2**55, typically, 16 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 DFloating

Source

pub const RADIX: u32 = 2u32

The radix or base of the internal representation of DFloating.

Source

pub const MANTISSA_DIGITS: u32 = 56u32

Number of significant digits in base 2.

Source

pub const DIGITS: u32 = 16u32

Approximate number of significant digits in base 10.

Source

pub const EPSILON: DFloating

Machine epsilon value for DFloating.

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

Source

pub const MIN: DFloating

Smallest finite DFloating value.

Source

pub const MIN_POSITIVE: DFloating

Smallest positive normal DFloating value.

Source

pub const MAX: DFloating

Largest finite DFloating value.

Source

pub const MIN_EXP: i32 = -127i32

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

Source

pub const MAX_EXP: i32 = 127i32

Maximum possible power of 2 exponent.

Source

pub const MIN_10_EXP: i32 = -38i32

Minimum possible normal power of 10 exponent.

Source

pub const MAX_10_EXP: i32 = 38i32

Maximum possible power of 10 exponent.

Source

pub const BITS: u32 = 64u32

The size of the VAX D_floating type in bits.

Source

pub const fn to_bits(self) -> u64

Raw transmutation from the DFloating type to u64.

§Examples
assert_eq!(DFloating::from_f32(0_f32).to_bits(), 0_u64);
assert_eq!(DFloating::from_f32(1.5).to_bits(), 0x00000000000040C0_u64);
assert_eq!(DFloating::from_f32(12.5).to_bits(), 0x0000000000004248_u64);
Source

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

Raw transmutation from a u64 the DFloating type.

§Examples
assert_eq!(DFloating::from_bits(0), DFloating::from_f32(0_f32));
assert_eq!(DFloating::from_bits(0x00000000000040C0), DFloating::from_f32(1.5));
assert_eq!(DFloating::from_bits(0x0000000000004248), DFloating::from_f32(12.5));
Source

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

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

§Examples
let bytes = DFloating::from_f32(12.5).to_le_bytes();
assert_eq!(bytes, [0x48, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
Source

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

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

§Examples
let bytes = DFloating::from_f32(12.5).to_be_bytes();
assert_eq!(bytes, [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x48]);
Source

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

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

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

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

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

§Examples
let float = DFloating::from_le_bytes([0x48, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
assert_eq!(float, DFloating::from_f32(12.5));
Source

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

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

§Examples
let float = DFloating::from_be_bytes([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x48]);
assert_eq!(float, DFloating::from_f32(12.5));
Source

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

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

§Examples
let float = DFloating::from_ne_bytes(
    if cfg!(target_endian = "big") {
   [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x48]
    } else {
   [0x48, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
    }
);
assert_eq!(float, DFloating::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 DFloating type.

§Examples
assert_eq!(DFloating::from_bits(0x0000000000004248).to_swapped(), 0x4248000000000000_u64);
assert_eq!(DFloating::from_f32(12.5).to_swapped(), 0x4248000000000000_u64);
Source

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

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

§Examples
assert_eq!(DFloating::from_swapped(0x4248000000000000), DFloating::from_f32(12.5));
assert_eq!(DFloating::from_swapped(0x4248000000000000), DFloating::from_bits(0x0000000000004248));
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: DFloating = DFloating::from_i8(1);
const NEG: DFloating = DFloating::from_i8(-1);
assert_eq!(DFloating::from_bits(0).signum(), ONE);
assert_eq!(DFloating::MIN_POSITIVE.signum(), ONE);
assert_eq!(DFloating::MAX.signum(), ONE);
assert_eq!(DFloating::MIN.signum(), NEG);
assert!(DFloating::from_bits(0x8000).signum().is_reserved());
Source

pub const fn is_zero(&self) -> bool

Return true if the DFloating is zero.

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

pub const fn is_negative(&self) -> bool

Return true if the DFloating is negative.

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

pub const fn is_reserved(&self) -> bool

Return true if the DFloating is reserved.

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

pub const fn abs(self) -> Self

Force the sign of the DFloating 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!(DFloating::from_f32(*case).abs(), DFloating::from_f32(*abs));
}
Source

pub const fn negate(self) -> Self

Negate the sign of the DFloating 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!(DFloating::from_f32(*case).negate(), DFloating::from_f32(*neg));
}
Source

pub const fn sign(&self) -> Sign

Return the sign of the DFloating value.

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

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

Add a DFloating to another DFloating.

§Examples
const NINETEEN_POINT_FIVE: DFloating = DFloating::from_u8(17).add_to(DFloating::from_f32(2.5));
let seventeen = DFloating::from_u8(17);
let two_point_five = DFloating::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: DFloating = DFloating::from_u8(17) + DFloating::from_f32(2.5);
Source

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

Subtract a DFloating from another DFloating.

§Examples
const FOURTEEN_POINT_FIVE: DFloating = DFloating::from_u8(17).subtract_by(DFloating::from_f32(2.5));
let seventeen = DFloating::from_u8(17);
let two_point_five = DFloating::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: DFloating = DFloating::from_u8(17) - DFloating::from_f32(2.5);
Source

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

Multiply a DFloating by another DFloating.

§Examples
const SEVENTEEN_TIMES_TWENTY_THREE: DFloating = DFloating::from_u8(17).multiply_by(DFloating::from_u8(23));
let seventeen = DFloating::from_u8(17);
let twenty_three = DFloating::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: DFloating = DFloating::from_u8(17) * DFloating::from_u8(23);
Source

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

Divide a DFloating by another DFloating.

§Examples
const TWENTY_TWO_SEVENTHS: DFloating = DFloating::from_u8(22).divide_by(DFloating::from_u8(7));
let twenty_two = DFloating::from_u8(22);
let seven = DFloating::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: DFloating = DFloating::from_u8(22) / DFloating::from_u8(7);
Source

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

Convert from a DFloating 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 DFloating(D_floating) floating-point type, it may be useful for some calculations.

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

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

Convert from a VaxFloatingPoint<u64> to a DFloating.

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 DFloating(D_floating) floating-point type, it may be useful for some calculations.

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

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

Parse a string slice into a DFloating.

§Panics

This will panic if it fails to parse the string.

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

Invalid input strings will fail to compile.

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

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

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

pub const fn unwrap(self) -> Self

Panic if the DFloating 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: DFloating = DFloating::from_f32(12.5).unwrap();
assert_eq!(DFloating::from_f32(12.5), TWELVE_DOT_FIVE);
const OVERFLOW: DFloating = DFloating::MAX.add_to(DFloating::MAX).unwrap();
const DIV_BY_ZERO: DFloating = DFloating::MAX.divide_by(DFloating::from_bits(0));
// Without unwrap, sets constant to divide-by-zero encoded reserved value.
assert_eq!(DFloating::from_bits(0x8000), DIV_BY_ZERO);
const DIV_BY_ZERO: DFloating = DFloating::MAX.divide_by(DFloating::from_bits(0)).unwrap();
Source

pub const fn unwrap_or_default(self) -> Self

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

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

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

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

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

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

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

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

Returns the result from a closure if the DFloating 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: DFloating) -> DFloating {
    use vax_floating::Error::*;
    match <Result<DFloating>>::from(float) {
        Ok(float) => float,
        Err(Overflow(_)) | Err(DivByZero) => DFloating::MAX,
        Err(Underflow(_)) => DFloating::MIN_POSITIVE,
        Err(_) => DFloating::MIN,
    }
}

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

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

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

Convert from u8 to a DFloating.

Can be used to define constants.

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

From<u8> cannot be used to define constants.

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

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

Convert from i8 to a DFloating.

Can be used to define constants.

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

From<i8> cannot be used to define constants.

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

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

Convert from u16 to a DFloating.

Can be used to define constants.

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

From<u16> cannot be used to define constants.

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

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

Convert from i16 to a DFloating.

Can be used to define constants.

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

From<i16> cannot be used to define constants.

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

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

Convert from u32 to a DFloating.

Can be used to define constants.

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

From<u32> cannot be used to define constants.

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

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

Convert from i32 to a DFloating.

Can be used to define constants.

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

From<i32> cannot be used to define constants.

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

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

Convert from u64 to a DFloating.

Can be used to define constants.

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

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

From<u64> cannot be used to define constants.

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

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

Convert from i64 to a DFloating.

Can be used to define constants.

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

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

From<i64> cannot be used to define constants.

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

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

Convert from usize to a DFloating.

Can be used to define constants.

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

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

From<usize> cannot be used to define constants.

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

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

Convert from isize to a DFloating.

Can be used to define constants.

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

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

From<isize> cannot be used to define constants.

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

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

Convert from u128 to a DFloating.

Can be used to define constants.

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

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

From<u128> cannot be used to define constants.

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

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

Convert from i128 to a DFloating.

Can be used to define constants.

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

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

From<i128> cannot be used to define constants.

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

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

Convert from f32 to a DFloating.

Can be used to define constants.

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

From<f32> cannot be used to define constants.

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

pub const fn to_f32(&self) -> f32

Convert from a DFloating to f32.

Can be used to define constants.

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

From<DFloating> cannot be used to define constants.

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

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

Convert from f64 to a DFloating.

Can be used to define constants.

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

From<f64> cannot be used to define constants.

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

pub const fn to_f64(&self) -> f64

Convert from a DFloating to f64.

Can be used to define constants.

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

From<DFloating> cannot be used to define constants.

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

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

Convert from FFloating to a DFloating.

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: DFloating = DFloating::from_f_floating(FROM_ZERO);
const THREE_HALVES: DFloating = DFloating::from_f_floating(FROM_THREE_HALVES);
assert_eq!(DFloating::from_bits(0), ZERO);
assert_eq!(DFloating::from_bits(0x00000000000040C0), THREE_HALVES);

From<FFloating> cannot be used to define constants.

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

pub const fn to_f_floating(&self) -> FFloating

Convert from a DFloating to FFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: DFloating = DFloating::from_bits(0);
const FROM_THREE_HALVES: DFloating = DFloating::from_bits(0x00000000000040C0);
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<DFloating> cannot be used to define constants.

const FROM_ZERO: DFloating = DFloating::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 DFloating.

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: DFloating = DFloating::from_d_floating(FROM_ZERO);
const THREE_HALVES: DFloating = DFloating::from_d_floating(FROM_THREE_HALVES);
assert_eq!(DFloating::from_bits(0), ZERO);
assert_eq!(DFloating::from_bits(0x00000000000040C0), THREE_HALVES);

From<DFloating> cannot be used to define constants.

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

pub const fn to_d_floating(&self) -> DFloating

Convert from a DFloating to DFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: DFloating = DFloating::from_bits(0);
const FROM_THREE_HALVES: DFloating = DFloating::from_bits(0x00000000000040C0);
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<DFloating> cannot be used to define constants.

const FROM_ZERO: DFloating = DFloating::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 DFloating.

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: DFloating = DFloating::from_g_floating(FROM_ZERO);
const THREE_HALVES: DFloating = DFloating::from_g_floating(FROM_THREE_HALVES);
assert_eq!(DFloating::from_bits(0), ZERO);
assert_eq!(DFloating::from_bits(0x00000000000040C0), THREE_HALVES);

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 to_g_floating(&self) -> GFloating

Convert from a DFloating to GFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: DFloating = DFloating::from_bits(0);
const FROM_THREE_HALVES: DFloating = DFloating::from_bits(0x00000000000040C0);
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<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 from_h_floating(src: HFloating) -> Self

Convert from HFloating to a DFloating.

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: DFloating = DFloating::from_h_floating(FROM_ZERO);
const THREE_HALVES: DFloating = DFloating::from_h_floating(FROM_THREE_HALVES);
assert_eq!(DFloating::from_bits(0), ZERO);
assert_eq!(DFloating::from_bits(0x00000000000040C0), THREE_HALVES);

From<HFloating> cannot be used to define constants.

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

pub const fn to_h_floating(&self) -> HFloating

Convert from a DFloating to HFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: DFloating = DFloating::from_bits(0);
const FROM_THREE_HALVES: DFloating = DFloating::from_bits(0x00000000000040C0);
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<DFloating> cannot be used to define constants.

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

Trait Implementations§

Source§

impl Add<&DFloating> for &DFloating

Source§

type Output = <DFloating as Add>::Output

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&DFloating> for DFloating

Source§

type Output = <DFloating as Add>::Output

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = <DFloating as Add>::Output

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for DFloating

Source§

type Output = DFloating

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&DFloating> for DFloating

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for DFloating

Source§

fn add_assign(&mut self, other: DFloating)

Performs the += operation. Read more
Source§

impl Clone for DFloating

Source§

fn clone(&self) -> DFloating

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 DFloating

Source§

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

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

impl Default for DFloating

Source§

fn default() -> DFloating

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

impl Display for DFloating

Source§

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

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

impl Div<&DFloating> for &DFloating

Source§

type Output = <DFloating as Div>::Output

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&DFloating> for DFloating

Source§

type Output = <DFloating as Div>::Output

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = <DFloating as Div>::Output

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for DFloating

Source§

type Output = DFloating

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&DFloating> for DFloating

Source§

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

Performs the /= operation. Read more
Source§

impl DivAssign for DFloating

Source§

fn div_assign(&mut self, other: DFloating)

Performs the /= operation. Read more
Source§

impl From<&DFloating> for FFloating

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&DFloating> for GFloating

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&DFloating> for HFloating

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&DFloating> for f32

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&DFloating> for f64

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&FFloating> for DFloating

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<&HFloating> for DFloating

Source§

fn from(src: &HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&f32> for DFloating

Source§

fn from(src: &f32) -> Self

Converts to this type from the input type.
Source§

impl From<&f64> for DFloating

Source§

fn from(src: &f64) -> Self

Converts to this type from the input type.
Source§

impl From<&i128> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&i16> for DFloating

Source§

fn from(src: &i16) -> Self

Converts to this type from the input type.

Source§

impl From<&i32> for DFloating

Source§

fn from(src: &i32) -> Self

Converts to this type from the input type.

Source§

impl From<&i64> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&i8> for DFloating

Source§

fn from(src: &i8) -> Self

Converts to this type from the input type.

Source§

impl From<&isize> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&u128> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&u16> for DFloating

Source§

fn from(src: &u16) -> Self

Converts to this type from the input type.

Source§

impl From<&u32> for DFloating

Source§

fn from(src: &u32) -> Self

Converts to this type from the input type.

Source§

impl From<&u64> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<&u8> for DFloating

Source§

fn from(src: &u8) -> Self

Converts to this type from the input type.

Source§

impl From<&usize> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<DFloating> for FFloating

Source§

fn from(src: DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<DFloating> for GFloating

Source§

fn from(src: DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<DFloating> for HFloating

Source§

fn from(src: DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<DFloating> for Result<DFloating>

Source§

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

Converts to this type from the input type.
Source§

impl From<DFloating> for f32

Source§

fn from(src: DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<DFloating> for f64

Source§

fn from(src: DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<FFloating> for DFloating

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<HFloating> for DFloating

Source§

fn from(src: HFloating) -> Self

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl From<f32> for DFloating

Source§

fn from(src: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for DFloating

Source§

fn from(src: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<i16> for DFloating

Source§

fn from(src: i16) -> Self

Converts to this type from the input type.

Source§

impl From<i32> for DFloating

Source§

fn from(src: i32) -> Self

Converts to this type from the input type.

Source§

impl From<i64> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<i8> for DFloating

Source§

fn from(src: i8) -> Self

Converts to this type from the input type.

Source§

impl From<isize> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<u128> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<u16> for DFloating

Source§

fn from(src: u16) -> Self

Converts to this type from the input type.

Source§

impl From<u32> for DFloating

Source§

fn from(src: u32) -> Self

Converts to this type from the input type.

Source§

impl From<u64> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl From<u8> for DFloating

Source§

fn from(src: u8) -> Self

Converts to this type from the input type.

Source§

impl From<usize> for DFloating

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 DFloating::MANTISSA_DIGITS will be preserved. This will result in a loss of precision.

Source§

impl FromStr for DFloating

Source§

type Err = Error

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

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

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

impl Hash for DFloating

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 DFloating

Source§

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

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

impl Mul<&DFloating> for &DFloating

Source§

type Output = <DFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&DFloating> for DFloating

Source§

type Output = <DFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = <DFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for DFloating

Source§

type Output = DFloating

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&DFloating> for DFloating

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign for DFloating

Source§

fn mul_assign(&mut self, other: DFloating)

Performs the *= operation. Read more
Source§

impl Neg for &DFloating

Source§

type Output = <DFloating as Neg>::Output

The resulting type after applying the - operator.
Source§

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

Performs the unary - operation. Read more
Source§

impl Neg for DFloating

Source§

type Output = DFloating

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for DFloating

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 DFloating

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 &DFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<&i32> for DFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<&u32> for &DFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<&u32> for DFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

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

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<i32> for DFloating

Source§

type Output = DFloating

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

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

Performs the << operation. Read more
Source§

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

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<u32> for DFloating

Source§

type Output = DFloating

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

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

Performs the << operation. Read more
Source§

impl ShlAssign<&u32> for DFloating

Source§

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

Performs the <<= operation. Read more
Source§

impl ShlAssign<u32> for DFloating

Source§

fn shl_assign(&mut self, other: u32)

Performs the <<= operation. Read more
Source§

impl Shr<&i32> for &DFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<&i32> for DFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<&u32> for &DFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<&u32> for DFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<i32> for DFloating

Source§

type Output = DFloating

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<u32> for DFloating

Source§

type Output = DFloating

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

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

Performs the >> operation. Read more
Source§

impl ShrAssign<&u32> for DFloating

Source§

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

Performs the >>= operation. Read more
Source§

impl ShrAssign<u32> for DFloating

Source§

fn shr_assign(&mut self, other: u32)

Performs the >>= operation. Read more
Source§

impl Sub<&DFloating> for &DFloating

Source§

type Output = <DFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&DFloating> for DFloating

Source§

type Output = <DFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = <DFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for DFloating

Source§

type Output = DFloating

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&DFloating> for DFloating

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for DFloating

Source§

fn sub_assign(&mut self, other: DFloating)

Performs the -= operation. Read more
Source§

impl UpperExp for DFloating

Source§

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

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

impl Copy for DFloating

Source§

impl Eq for DFloating

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.