[−][src]Struct simple_soft_float::FloatProperties
properties of a particular floating-point format
Methods
impl FloatProperties
[src]
pub fn check_compatibility(
self,
other: Self
) -> Result<(), FloatPropertiesIncompatible>
[src]
self,
other: Self
) -> Result<(), FloatPropertiesIncompatible>
check for compatibility between two FloatProperties
values
pub const fn new_with_extended_flags(
exponent_width: usize,
mantissa_width: usize,
has_implicit_leading_bit: bool,
has_sign_bit: bool,
platform_properties: PlatformProperties
) -> Self
[src]
exponent_width: usize,
mantissa_width: usize,
has_implicit_leading_bit: bool,
has_sign_bit: bool,
platform_properties: PlatformProperties
) -> Self
create a new FloatProperties
value
pub const fn new(exponent_width: usize, mantissa_width: usize) -> Self
[src]
create a new FloatProperties
value
pub const fn new_with_platform_properties(
exponent_width: usize,
mantissa_width: usize,
platform_properties: PlatformProperties
) -> Self
[src]
exponent_width: usize,
mantissa_width: usize,
platform_properties: PlatformProperties
) -> Self
create a new FloatProperties
value
pub const STANDARD_16: Self
[src]
FloatProperties
for standard binary16 format
pub const STANDARD_32: Self
[src]
FloatProperties
for standard binary32 format
pub const STANDARD_64: Self
[src]
FloatProperties
for standard binary64 format
pub const STANDARD_128: Self
[src]
FloatProperties
for standard binary128 format
pub const fn standard_16_with_platform_properties(
platform_properties: PlatformProperties
) -> Self
[src]
platform_properties: PlatformProperties
) -> Self
FloatProperties
for standard binary16 format
pub const fn standard_32_with_platform_properties(
platform_properties: PlatformProperties
) -> Self
[src]
platform_properties: PlatformProperties
) -> Self
FloatProperties
for standard binary32 format
pub const fn standard_64_with_platform_properties(
platform_properties: PlatformProperties
) -> Self
[src]
platform_properties: PlatformProperties
) -> Self
FloatProperties
for standard binary64 format
pub const fn standard_128_with_platform_properties(
platform_properties: PlatformProperties
) -> Self
[src]
platform_properties: PlatformProperties
) -> Self
FloatProperties
for standard binary128 format
pub fn standard_with_platform_properties(
width: usize,
platform_properties: PlatformProperties
) -> Option<Self>
[src]
width: usize,
platform_properties: PlatformProperties
) -> Option<Self>
construct FloatProperties
for standard width
-bit binary interchange format, if it exists
pub fn standard(width: usize) -> Option<Self>
[src]
construct FloatProperties
for standard width
-bit binary interchange format, if it exists
pub fn is_standard(self) -> bool
[src]
check if self
is a standard binary interchange format.
pub const fn exponent_width(self) -> usize
[src]
the number of bits in the exponent field
pub const fn mantissa_width(self) -> usize
[src]
the number of bits in the mantissa field (excludes any implicit leading bit)
pub const fn has_implicit_leading_bit(self) -> bool
[src]
if the floating-point format uses an implicit leading bit
pub const fn has_sign_bit(self) -> bool
[src]
if the floating-point format has a sign bit
pub const fn platform_properties(self) -> PlatformProperties
[src]
get the PlatformProperties
pub fn quiet_nan_format(self) -> QuietNaNFormat
[src]
get the QuietNaNFormat
pub const fn width(self) -> usize
[src]
get the floating-point format's width in bits
pub const fn fraction_width(self) -> usize
[src]
get the number of bits after the radix point in the representation of normal floating-point values
pub const fn sign_field_shift(self) -> usize
[src]
get the amount by which the floating-point bits should be shifted right in order to extract the sign field.
the sign field can be extracted using (bits & sign_field_mask) >> sign_field_shift
pub fn sign_field_mask<Bits: FloatBitsType>(self) -> Bits
[src]
get the bitwise mask for the sign field (before shifting to extract).
the sign field can be extracted using (bits & sign_field_mask) >> sign_field_shift
pub const fn exponent_field_shift(self) -> usize
[src]
get the amount by which the floating-point bits should be shifted right in order to extract the exponent field.
the exponent field can be extracted using (bits & exponent_field_mask) >> exponent_field_shift
pub fn exponent_field_mask<Bits: FloatBitsType>(self) -> Bits
[src]
get the bitwise mask for the exponent field (before shifting to extract).
the exponent field can be extracted using (bits & exponent_field_mask) >> exponent_field_shift
pub const fn mantissa_field_shift(self) -> usize
[src]
get the amount by which the floating-point bits should be shifted right in order to extract the mantissa field.
the mantissa field can be extracted using (bits & mantissa_field_mask) >> mantissa_field_shift
pub fn mantissa_field_mask<Bits: FloatBitsType>(self) -> Bits
[src]
get the bitwise mask for the mantissa field (before shifting to extract).
the mantissa field can be extracted using (bits & mantissa_field_mask) >> mantissa_field_shift
pub fn mantissa_field_max<Bits: FloatBitsType>(self) -> Bits
[src]
get the maximum value of the mantissa field
pub fn mantissa_field_normal_min<Bits: FloatBitsType>(self) -> Bits
[src]
get the minimum value the mantissa field can take on for normal floating-point numbers.
pub const fn mantissa_field_msb_shift(self) -> usize
[src]
get the amount by which the floating-point bits should be shifted right in order to extract the mantissa field's MSB.
the mantissa field's MSB can be extracted using (bits & mantissa_field_msb_mask) >> mantissa_field_msb_shift
pub fn mantissa_field_msb_mask<Bits: FloatBitsType>(self) -> Bits
[src]
get the bitwise mask for the mantissa field's MSB (before shifting to extract).
the mantissa field's MSB can be extracted using (bits & mantissa_field_msb_mask) >> mantissa_field_msb_shift
pub fn exponent_bias<Bits: FloatBitsType>(self) -> Bits
[src]
get the amount by which the exponent field is offset from the mathematical exponent for normal floating-point numbers.
the mathematical exponent and the exponent field's values for normal
floating-point numbers are related by the following equation:
mathematical_exponent + exponent_bias == exponent_field
pub fn exponent_inf_nan<Bits: FloatBitsType>(self) -> Bits
[src]
get the value used in the exponent field for infinities and NaNs
pub fn exponent_zero_subnormal<Bits: FloatBitsType>(self) -> Bits
[src]
get the value used in the exponent field for zeros and subnormals
pub fn exponent_min_normal<Bits: FloatBitsType>(self) -> Bits
[src]
get the minimum value of the exponent field for normal floating-point numbers.
the mathematical exponent and the exponent field's values for normal
floating-point numbers are related by the following equation:
mathematical_exponent + exponent_bias == exponent_field
pub fn exponent_max_normal<Bits: FloatBitsType>(self) -> Bits
[src]
get the maximum value of the exponent field for normal floating-point numbers.
the mathematical exponent and the exponent field's values for normal
floating-point numbers are related by the following equation:
mathematical_exponent + exponent_bias == exponent_field
pub fn overall_mask<Bits: FloatBitsType>(self) -> Bits
[src]
get the mask for the whole floating-point format
Trait Implementations
impl Clone for FloatProperties
[src]
fn clone(&self) -> FloatProperties
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FloatProperties
[src]
impl Debug for FloatProperties
[src]
impl Eq for FloatProperties
[src]
impl FloatTraits for FloatProperties
[src]
type Bits = BigUint
the type used to represent bits for a floating-point format
fn properties(&self) -> FloatProperties
[src]
impl Hash for FloatProperties
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<FloatProperties> for FloatProperties
[src]
fn eq(&self, other: &FloatProperties) -> bool
[src]
fn ne(&self, other: &FloatProperties) -> bool
[src]
impl StructuralEq for FloatProperties
[src]
impl StructuralPartialEq for FloatProperties
[src]
Auto Trait Implementations
impl RefUnwindSafe for FloatProperties
impl Send for FloatProperties
impl Sync for FloatProperties
impl Unpin for FloatProperties
impl UnwindSafe for FloatProperties
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,