HFloating

Struct HFloating 

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

§The VAX H_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 H_floating floating-point type.

§VAX Architecture Reference Manual

The H_floating data type need not be supported by a subset implementation. An H_floating datum is 16 contiguous bytes starting on an arbitrary byte boundary. The bits are labeled from the right 〈0〉 through 〈127〉, as shown in Figure 1.2. An H_floating datum is specified by its address A which is the address of the byte containing bit 〈0〉. The form of an H_floating datum is sign magnitude with bit 〈15〉, the sign bit; bits 〈14:0〉, an excess 16384 binary exponent; and bits 〈127:16〉, a normalized 113-bit fraction with the redundant most-significant fraction bit not represented. Within the fraction, bits of increasing significance are from 〈112〉 through 〈127〉, 〈96〉 through 〈111〉, 〈80〉 through 〈95〉, 〈64〉 through 〈79〉, 〈48〉 through 〈63〉, 〈32〉 through 〈47〉, and 〈16〉 through 〈31〉. The 15-bit exponent field encodes the values 0 through 32767. An exponent value of 0 together with a sign bit of 0 is taken to indicate that the H_floating datum has a value of O. Exponent values of 1 through 32767 indicate true binary exponents of -16383 through +16383. 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 an H_floating datum is in the approximate range .84*10-4932 through .59*104932. The precision of an H_floating datum is approximately one part in 2112, typically 33 decimal digits.

H_floating figure 1

§VAX MACRO and Instruction Set Reference Manual

An H_floating datum is 16 contiguous bytes starting on an arbitrary byte boundary. The 128 bits are labeled from right to left 0 to 127.

H_floating figure 2

An H_floating datum is specified by its address, A, which is the address of the byte containing bit 0. The form of an H_floating datum is sign magnitude with bit 15 as the sign bit, bits 14:0 as an excess 16,384 binary exponent, and bits 127:16 as a normalized 113-bit fraction with the redundant most-significant fraction bit not represented. Within the fraction, bits of increasing significance range from bits 112 to 127, 96 to 111, 80 to 95, 64 to 79, 48 to 63, 32 to 47, and 16 to 31. The 15-bit exponent field encodes the values 0 to 32,767. An exponent value of zero, together with a sign bit of 0, is taken to indicate that the H_floating datum has a value of zero. Exponent values of 1 to 32,767 indicate true binary exponents of -16,383 to +16,383. 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 an H_floating datum is in the approximate range .84*10**-4932 to .59*10**4932. The precision of an H_floating datum is approximately one part in 2**112, typically, 33 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 HFloating

Source

pub const RADIX: u32 = 2u32

The radix or base of the internal representation of HFloating.

Source

pub const MANTISSA_DIGITS: u32 = 113u32

Number of significant digits in base 2.

Source

pub const DIGITS: u32 = 34u32

Approximate number of significant digits in base 10.

Source

pub const EPSILON: HFloating

Machine epsilon value for HFloating.

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

Source

pub const MIN: HFloating

Smallest finite HFloating value.

Source

pub const MIN_POSITIVE: HFloating

Smallest positive normal HFloating value.

Source

pub const MAX: HFloating

Largest finite HFloating value.

Source

pub const MIN_EXP: i32 = -16_383i32

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

Source

pub const MAX_EXP: i32 = 16_383i32

Maximum possible power of 2 exponent.

Source

pub const MIN_10_EXP: i32 = -4_932i32

Minimum possible normal power of 10 exponent.

Source

pub const MAX_10_EXP: i32 = 4_931i32

Maximum possible power of 10 exponent.

Source

pub const BITS: u32 = 128u32

The size of the VAX H_floating type in bits.

Source

pub const fn to_bits(self) -> u128

Raw transmutation from the HFloating type to u128.

§Examples
assert_eq!(HFloating::from_f32(0_f32).to_bits(), 0_u128);
assert_eq!(HFloating::from_f32(1.5).to_bits(), 0x0000000000000000000000000080004001_u128);
assert_eq!(HFloating::from_f32(12.5).to_bits(), 0x0000000000000000000000000090004004_u128);
Source

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

Raw transmutation from a u128 the HFloating type.

§Examples
assert_eq!(HFloating::from_bits(0), HFloating::from_f32(0_f32));
assert_eq!(HFloating::from_bits(0x0000000000000000000000000080004001), HFloating::from_f32(1.5));
assert_eq!(HFloating::from_bits(0x0000000000000000000000000090004004), HFloating::from_f32(12.5));
Source

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pub const fn to_swapped(self) -> u128

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

§Examples
assert_eq!(HFloating::from_bits(0x0000000000000000000000000090004004).to_swapped(), 0x40049000000000000000000000000000_u128);
assert_eq!(HFloating::from_f32(12.5).to_swapped(), 0x40049000000000000000000000000000_u128);
Source

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

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

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

pub const fn is_zero(&self) -> bool

Return true if the HFloating is zero.

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

pub const fn is_negative(&self) -> bool

Return true if the HFloating is negative.

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

pub const fn is_reserved(&self) -> bool

Return true if the HFloating is reserved.

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

pub const fn abs(self) -> Self

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

pub const fn negate(self) -> Self

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

pub const fn sign(&self) -> Sign

Return the sign of the HFloating value.

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

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

Add a HFloating to another HFloating.

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

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

Subtract a HFloating from another HFloating.

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

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

Multiply a HFloating by another HFloating.

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

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

Divide a HFloating by another HFloating.

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

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

Convert from a HFloating to a VaxFloatingPoint<u128>.

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

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

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

Convert from a VaxFloatingPoint<u128> to a HFloating.

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

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

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

Parse a string slice into a HFloating.

§Panics

This will panic if it fails to parse the string.

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

Invalid input strings will fail to compile.

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

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

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

pub const fn unwrap(self) -> Self

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

pub const fn unwrap_or_default(self) -> Self

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

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

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

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

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

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

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

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

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

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

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

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

Convert from u8 to a HFloating.

Can be used to define constants.

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

From<u8> cannot be used to define constants.

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

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

Convert from i8 to a HFloating.

Can be used to define constants.

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

From<i8> cannot be used to define constants.

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

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

Convert from u16 to a HFloating.

Can be used to define constants.

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

From<u16> cannot be used to define constants.

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

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

Convert from i16 to a HFloating.

Can be used to define constants.

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

From<i16> cannot be used to define constants.

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

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

Convert from u32 to a HFloating.

Can be used to define constants.

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

From<u32> cannot be used to define constants.

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

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

Convert from i32 to a HFloating.

Can be used to define constants.

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

From<i32> cannot be used to define constants.

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

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

Convert from u64 to a HFloating.

Can be used to define constants.

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

From<u64> cannot be used to define constants.

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

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

Convert from i64 to a HFloating.

Can be used to define constants.

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

From<i64> cannot be used to define constants.

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

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

Convert from usize to a HFloating.

Can be used to define constants.

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

From<usize> cannot be used to define constants.

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

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

Convert from isize to a HFloating.

Can be used to define constants.

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

From<isize> cannot be used to define constants.

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

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

Convert from u128 to a HFloating.

Can be used to define constants.

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

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

From<u128> cannot be used to define constants.

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

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

Convert from i128 to a HFloating.

Can be used to define constants.

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

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

From<i128> cannot be used to define constants.

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

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

Convert from f32 to a HFloating.

Can be used to define constants.

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

From<f32> cannot be used to define constants.

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

pub const fn to_f32(&self) -> f32

Convert from a HFloating to f32.

Can be used to define constants.

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

From<HFloating> cannot be used to define constants.

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

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

Convert from f64 to a HFloating.

Can be used to define constants.

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

From<f64> cannot be used to define constants.

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

pub const fn to_f64(&self) -> f64

Convert from a HFloating to f64.

Can be used to define constants.

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

From<HFloating> cannot be used to define constants.

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

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

Convert from FFloating to a HFloating.

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

From<FFloating> cannot be used to define constants.

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

pub const fn to_f_floating(&self) -> FFloating

Convert from a HFloating to FFloating.

Can be used to define constants.

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

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

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

From<DFloating> cannot be used to define constants.

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

pub const fn to_d_floating(&self) -> DFloating

Convert from a HFloating to DFloating.

Can be used to define constants.

§Examples
const FROM_ZERO: HFloating = HFloating::from_bits(0);
const FROM_THREE_HALVES: HFloating = HFloating::from_bits(0x0000000000000000000000000080004001);
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<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 from_g_floating(src: GFloating) -> Self

Convert from GFloating to a HFloating.

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

From<GFloating> cannot be used to define constants.

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

pub const fn to_g_floating(&self) -> GFloating

Convert from a HFloating to GFloating.

Can be used to define constants.

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

Convert from HFloating to a HFloating.

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

From<HFloating> cannot be used to define constants.

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

pub const fn to_h_floating(&self) -> HFloating

Convert from a HFloating to HFloating.

Can be used to define constants.

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

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

Trait Implementations§

Source§

impl Add<&HFloating> for &HFloating

Source§

type Output = <HFloating as Add>::Output

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&HFloating> for HFloating

Source§

type Output = <HFloating as Add>::Output

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = <HFloating as Add>::Output

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for HFloating

Source§

type Output = HFloating

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&HFloating> for HFloating

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for HFloating

Source§

fn add_assign(&mut self, other: HFloating)

Performs the += operation. Read more
Source§

impl Clone for HFloating

Source§

fn clone(&self) -> HFloating

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 HFloating

Source§

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

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

impl Default for HFloating

Source§

fn default() -> HFloating

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

impl Display for HFloating

Source§

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

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

impl Div<&HFloating> for &HFloating

Source§

type Output = <HFloating as Div>::Output

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&HFloating> for HFloating

Source§

type Output = <HFloating as Div>::Output

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = <HFloating as Div>::Output

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for HFloating

Source§

type Output = HFloating

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&HFloating> for HFloating

Source§

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

Performs the /= operation. Read more
Source§

impl DivAssign for HFloating

Source§

fn div_assign(&mut self, other: HFloating)

Performs the /= operation. Read more
Source§

impl From<&DFloating> for HFloating

Source§

fn from(src: &DFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&FFloating> for HFloating

Source§

fn from(src: &FFloating) -> 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<&HFloating> for DFloating

Source§

fn from(src: &HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&HFloating> for FFloating

Source§

fn from(src: &HFloating) -> 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<&HFloating> for f32

Source§

fn from(src: &HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&HFloating> for f64

Source§

fn from(src: &HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<&f32> for HFloating

Source§

fn from(src: &f32) -> Self

Converts to this type from the input type.
Source§

impl From<&f64> for HFloating

Source§

fn from(src: &f64) -> Self

Converts to this type from the input type.
Source§

impl From<&i128> for HFloating

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

Source§

impl From<&i16> for HFloating

Source§

fn from(src: &i16) -> Self

Converts to this type from the input type.

Source§

impl From<&i32> for HFloating

Source§

fn from(src: &i32) -> Self

Converts to this type from the input type.

Source§

impl From<&i64> for HFloating

Source§

fn from(src: &i64) -> Self

Converts to this type from the input type.

Source§

impl From<&i8> for HFloating

Source§

fn from(src: &i8) -> Self

Converts to this type from the input type.

Source§

impl From<&isize> for HFloating

Source§

fn from(src: &isize) -> Self

Converts to this type from the input type.

Source§

impl From<&u128> for HFloating

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

Source§

impl From<&u16> for HFloating

Source§

fn from(src: &u16) -> Self

Converts to this type from the input type.

Source§

impl From<&u32> for HFloating

Source§

fn from(src: &u32) -> Self

Converts to this type from the input type.

Source§

impl From<&u64> for HFloating

Source§

fn from(src: &u64) -> Self

Converts to this type from the input type.

Source§

impl From<&u8> for HFloating

Source§

fn from(src: &u8) -> Self

Converts to this type from the input type.

Source§

impl From<&usize> for HFloating

Source§

fn from(src: &usize) -> 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<FFloating> for HFloating

Source§

fn from(src: FFloating) -> 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<HFloating> for DFloating

Source§

fn from(src: HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<HFloating> for FFloating

Source§

fn from(src: HFloating) -> 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<HFloating> for Result<HFloating>

Source§

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

Converts to this type from the input type.
Source§

impl From<HFloating> for f32

Source§

fn from(src: HFloating) -> Self

Converts to this type from the input type.
Source§

impl From<HFloating> for f64

Source§

fn from(src: HFloating) -> Self

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl From<f32> for HFloating

Source§

fn from(src: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for HFloating

Source§

fn from(src: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for HFloating

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

Source§

impl From<i16> for HFloating

Source§

fn from(src: i16) -> Self

Converts to this type from the input type.

Source§

impl From<i32> for HFloating

Source§

fn from(src: i32) -> Self

Converts to this type from the input type.

Source§

impl From<i64> for HFloating

Source§

fn from(src: i64) -> Self

Converts to this type from the input type.

Source§

impl From<i8> for HFloating

Source§

fn from(src: i8) -> Self

Converts to this type from the input type.

Source§

impl From<isize> for HFloating

Source§

fn from(src: isize) -> Self

Converts to this type from the input type.

Source§

impl From<u128> for HFloating

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

Source§

impl From<u16> for HFloating

Source§

fn from(src: u16) -> Self

Converts to this type from the input type.

Source§

impl From<u32> for HFloating

Source§

fn from(src: u32) -> Self

Converts to this type from the input type.

Source§

impl From<u64> for HFloating

Source§

fn from(src: u64) -> Self

Converts to this type from the input type.

Source§

impl From<u8> for HFloating

Source§

fn from(src: u8) -> Self

Converts to this type from the input type.

Source§

impl From<usize> for HFloating

Source§

fn from(src: usize) -> Self

Converts to this type from the input type.

Source§

impl FromStr for HFloating

Source§

type Err = Error

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

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

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

impl Hash for HFloating

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 HFloating

Source§

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

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

impl Mul<&HFloating> for &HFloating

Source§

type Output = <HFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&HFloating> for HFloating

Source§

type Output = <HFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = <HFloating as Mul>::Output

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for HFloating

Source§

type Output = HFloating

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&HFloating> for HFloating

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign for HFloating

Source§

fn mul_assign(&mut self, other: HFloating)

Performs the *= operation. Read more
Source§

impl Neg for &HFloating

Source§

type Output = <HFloating as Neg>::Output

The resulting type after applying the - operator.
Source§

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

Performs the unary - operation. Read more
Source§

impl Neg for HFloating

Source§

type Output = HFloating

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for HFloating

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 HFloating

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

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<&i32> for HFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<&u32> for &HFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<&u32> for HFloating

Source§

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

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

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

Performs the << operation. Read more
Source§

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

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<i32> for HFloating

Source§

type Output = HFloating

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

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

Performs the << operation. Read more
Source§

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

Source§

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

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

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

Performs the << operation. Read more
Source§

impl Shl<u32> for HFloating

Source§

type Output = HFloating

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

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

Performs the << operation. Read more
Source§

impl ShlAssign<&u32> for HFloating

Source§

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

Performs the <<= operation. Read more
Source§

impl ShlAssign<u32> for HFloating

Source§

fn shl_assign(&mut self, other: u32)

Performs the <<= operation. Read more
Source§

impl Shr<&i32> for &HFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<&i32> for HFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<&u32> for &HFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<&u32> for HFloating

Source§

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

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<i32> for HFloating

Source§

type Output = HFloating

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

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

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

Performs the >> operation. Read more
Source§

impl Shr<u32> for HFloating

Source§

type Output = HFloating

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

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

Performs the >> operation. Read more
Source§

impl ShrAssign<&u32> for HFloating

Source§

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

Performs the >>= operation. Read more
Source§

impl ShrAssign<u32> for HFloating

Source§

fn shr_assign(&mut self, other: u32)

Performs the >>= operation. Read more
Source§

impl Sub<&HFloating> for &HFloating

Source§

type Output = <HFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&HFloating> for HFloating

Source§

type Output = <HFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = <HFloating as Sub>::Output

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for HFloating

Source§

type Output = HFloating

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&HFloating> for HFloating

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for HFloating

Source§

fn sub_assign(&mut self, other: HFloating)

Performs the -= operation. Read more
Source§

impl UpperExp for HFloating

Source§

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

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

impl Copy for HFloating

Source§

impl Eq for HFloating

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.