pub trait Float: Sized + Copy {
type Binary: Copy + Not<Output = Self::Binary> + Shr<u32, Output = Self::Binary> + Add<Self::Binary, Output = Self::Binary> + AddAssign<Self::Binary> + BitAnd<Self::Binary, Output = Self::Binary> + BitAndAssign<Self::Binary>;
const MANITSSA_BITS: u32;
const MANTISSA_MASK: Self::Binary;
const BINARY_ONE: Self::Binary;
const TY: AnyArrayDType;
// Required methods
fn to_binary(self) -> Self::Binary;
fn from_binary(u: Self::Binary) -> Self;
}
Expand description
Floating point types.
Required Associated Constants§
Sourceconst MANITSSA_BITS: u32
const MANITSSA_BITS: u32
Number of significant digits in base 2
Sourceconst MANTISSA_MASK: Self::Binary
const MANTISSA_MASK: Self::Binary
Binary mask to extract only the mantissa bits
Sourceconst BINARY_ONE: Self::Binary
const BINARY_ONE: Self::Binary
Binary 0x1
Sourceconst TY: AnyArrayDType
const TY: AnyArrayDType
Dtype of this type
Required Associated Types§
Required Methods§
Sourcefn to_binary(self) -> Self::Binary
fn to_binary(self) -> Self::Binary
Bit-cast the floating point value to its binary representation
Sourcefn from_binary(u: Self::Binary) -> Self
fn from_binary(u: Self::Binary) -> Self
Bit-cast the binary representation into a floating point value
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.