[−][src]Struct simple_soft_float::Float
the floating-point type with the specified FloatTraits
Methods
impl<Bits: FloatBitsType, FT: FloatTraits<Bits = Bits>> Float<FT>
[src]
pub fn from_bits_and_traits(bits: Bits, traits: FT) -> Self
[src]
construct Float
from bits
pub fn from_bits(bits: Bits) -> Self where
FT: Default,
[src]
FT: Default,
construct Float
from bits
pub fn bits(&self) -> &Bits
[src]
get the underlying bits
pub fn set_bits(&mut self, bits: Bits)
[src]
set the underlying bits
pub fn traits(&self) -> &FT
[src]
get the FloatTraits
pub fn into_bits_and_traits(self) -> (Bits, FT)
[src]
get the bits and FloatTraits
pub fn into_bits(self) -> Bits
[src]
get the underlying bits
pub fn into_traits(self) -> FT
[src]
get the FloatTraits
pub fn properties(&self) -> FloatProperties
[src]
get the FloatProperties
pub fn sign(&self) -> Sign
[src]
get the sign
pub fn set_sign(&mut self, sign: Sign)
[src]
set the sign
pub fn toggle_sign(&mut self)
[src]
toggle the sign
pub fn exponent_field(&self) -> Bits
[src]
get the exponent field
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 set_exponent_field(&mut self, exponent: Bits)
[src]
set the exponent field
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 mantissa_field(&self) -> Bits
[src]
get the mantissa field
pub fn set_mantissa_field(&mut self, mantissa: Bits)
[src]
set the mantissa field
pub fn mantissa_field_msb(&self) -> bool
[src]
get the mantissa field's MSB
pub fn set_mantissa_field_msb(&mut self, mantissa_msb: bool)
[src]
set the mantissa field's MSB
pub fn class(&self) -> FloatClass
[src]
calculate the FloatClass
pub fn is_negative_infinity(&self) -> bool
[src]
return true
if self.class()
is NegativeInfinity
pub fn is_negative_normal(&self) -> bool
[src]
return true
if self.class()
is NegativeNormal
pub fn is_negative_subnormal(&self) -> bool
[src]
return true
if self.class()
is NegativeSubnormal
pub fn is_negative_zero(&self) -> bool
[src]
return true
if self.class()
is NegativeZero
pub fn is_positive_infinity(&self) -> bool
[src]
return true
if self.class()
is PositiveInfinity
pub fn is_positive_normal(&self) -> bool
[src]
return true
if self.class()
is PositiveNormal
pub fn is_positive_subnormal(&self) -> bool
[src]
return true
if self.class()
is PositiveSubnormal
pub fn is_positive_zero(&self) -> bool
[src]
return true
if self.class()
is PositiveZero
pub fn is_quiet_nan(&self) -> bool
[src]
return true
if self.class()
is QuietNaN
pub fn is_signaling_nan(&self) -> bool
[src]
return true
if self.class()
is SignalingNaN
pub fn is_infinity(&self) -> bool
[src]
return true
if self
is infinity
pub fn is_normal(&self) -> bool
[src]
return true
if self.class()
is NegativeNormal
or PositiveNormal
pub fn is_subnormal(&self) -> bool
[src]
return true
if self
is subnormal
pub fn is_zero(&self) -> bool
[src]
return true
if self
is zero
pub fn is_nan(&self) -> bool
[src]
return true
if self
is NaN
pub fn is_finite(&self) -> bool
[src]
return true
if self
is finite (not NaN or infinity)
pub fn is_subnormal_or_zero(&self) -> bool
[src]
return true
if self
is subnormal or zero
pub fn to_ratio(&self) -> Option<Ratio<BigInt>>
[src]
get the mathematical value of self
as a Ratio<BigInt>
.
if self
is NaN or infinite, returns None
.
pub fn to_real_algebraic_number(&self) -> Option<RealAlgebraicNumber>
[src]
get the mathematical value of self
as a RealAlgebraicNumber
.
if self
is NaN or infinite, returns None
.
pub fn positive_zero_with_traits(traits: FT) -> Self
[src]
get the positive zero value
pub fn positive_zero() -> Self where
FT: Default,
[src]
FT: Default,
get the positive zero value
pub fn negative_zero_with_traits(traits: FT) -> Self
[src]
get the negative zero value
pub fn negative_zero() -> Self where
FT: Default,
[src]
FT: Default,
get the negative zero value
pub fn signed_zero_with_traits(sign: Sign, traits: FT) -> Self
[src]
get the zero with sign sign
pub fn signed_zero(sign: Sign) -> Self where
FT: Default,
[src]
FT: Default,
get the zero with sign sign
pub fn positive_infinity_with_traits(traits: FT) -> Self
[src]
get the positive infinity value
pub fn positive_infinity() -> Self where
FT: Default,
[src]
FT: Default,
get the positive infinity value
pub fn negative_infinity_with_traits(traits: FT) -> Self
[src]
get the negative infinity value
pub fn negative_infinity() -> Self where
FT: Default,
[src]
FT: Default,
get the negative infinity value
pub fn signed_infinity_with_traits(sign: Sign, traits: FT) -> Self
[src]
get the infinity with sign sign
pub fn signed_infinity(sign: Sign) -> Self where
FT: Default,
[src]
FT: Default,
get the infinity with sign sign
pub fn quiet_nan_with_traits(traits: FT) -> Self
[src]
get the canonical quiet NaN, which is also just the canonical NaN
pub fn quiet_nan() -> Self where
FT: Default,
[src]
FT: Default,
get the canonical quiet NaN, which is also just the canonical NaN
pub fn signaling_nan_with_traits(traits: FT) -> Self
[src]
get the canonical signaling NaN
pub fn signaling_nan() -> Self where
FT: Default,
[src]
FT: Default,
get the canonical signaling NaN
pub fn into_quiet_nan(self) -> Self
[src]
convert self
into a quiet NaN
pub fn to_quiet_nan(&self) -> Self
[src]
convert self
into a quiet NaN
pub fn signed_max_normal_with_traits(sign: Sign, traits: FT) -> Self
[src]
get the largest finite value with sign sign
pub fn signed_max_normal(sign: Sign) -> Self where
FT: Default,
[src]
FT: Default,
get the largest finite value with sign sign
pub fn signed_min_subnormal_with_traits(sign: Sign, traits: FT) -> Self
[src]
get the subnormal value closest to zero with sign sign
pub fn signed_min_subnormal(sign: Sign) -> Self where
FT: Default,
[src]
FT: Default,
get the subnormal value closest to zero with sign sign
pub fn from_real_algebraic_number_with_traits(
value: &RealAlgebraicNumber,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: &RealAlgebraicNumber,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
round from a RealAlgebraicNumber
into a floating-point value.
pub fn from_real_algebraic_number(
value: &RealAlgebraicNumber,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: &RealAlgebraicNumber,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
round from a RealAlgebraicNumber
into a floating-point value.
pub fn add(
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
add floating-point numbers
pub fn sub(
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
subtract floating-point numbers
pub fn mul(
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
multiply floating-point numbers
pub fn div(
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
divide floating-point numbers
pub fn ieee754_remainder(
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rhs: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
compute the IEEE 754 remainder of two floating-point numbers
pub fn fused_mul_add(
&self,
factor: &Self,
term: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
factor: &Self,
term: &Self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
calculate the result of (self * factor) + term
rounding only once, returning the result
pub fn round_to_integer(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<BigInt>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<BigInt>
round self
to an integer, returning the result as an integer or None
pub fn round_to_integral(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
round self
to an integer, returning the result as a Float
pub fn normalize(&mut self)
[src]
normalize self
.
This is a no-op for all floating-point formats where
has_implicit_leading_bit
is true
(which includes all standard
floating-point formats).
pub fn next_up_or_down(
&self,
up_or_down: UpOrDown,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
up_or_down: UpOrDown,
fp_state: Option<&mut FPState>
) -> Self
compute the result of next_up
or next_down
pub fn next_up(&self, fp_state: Option<&mut FPState>) -> Self
[src]
compute the least floating-point number that compares greater than self
pub fn next_down(&self, fp_state: Option<&mut FPState>) -> Self
[src]
compute the greatest floating-point number that compares less than self
pub fn log_b(&self, fp_state: Option<&mut FPState>) -> Option<BigInt>
[src]
get the floor of the log base 2 of the absolute value of self
pub fn scale_b(
&self,
scale: BigInt,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
scale: BigInt,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
get self * 2^scale
pub fn sqrt(
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
get the square-root of self
pub fn convert_from_float_with_traits<SrcFT: FloatTraits>(
src: &Float<SrcFT>,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
src: &Float<SrcFT>,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert src
to the floating-point format specified by traits
.
pub fn convert_from_float<SrcFT: FloatTraits>(
src: &Float<SrcFT>,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
src: &Float<SrcFT>,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert src
to the floating-point format specified by FT::default()
where Self
is Float<FT>
.
pub fn convert_to_float_with_traits<DestFT: FloatTraits>(
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: DestFT
) -> Float<DestFT>
[src]
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: DestFT
) -> Float<DestFT>
convert self
to the floating-point format specified by traits
.
pub fn convert_to_float<DestFT: FloatTraits + Default>(
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Float<DestFT>
[src]
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Float<DestFT>
convert self
to the floating-point format specified by DestFT::default()
.
pub fn neg_assign(&mut self)
[src]
negate and assign the result back to self
.
identical to self.toggle_sign()
pub fn neg(&self) -> Self
[src]
compute the negation of self
pub fn abs_assign(&mut self)
[src]
compute the absolute-value and assign the result back to self
.
identical to self.set_sign(Sign::Positive)
pub fn abs(&self) -> Self
[src]
compute the absolute-value
pub fn copy_sign_assign<FT2: FloatTraits>(&mut self, sign_src: &Float<FT2>)
[src]
set self
's sign to the sign of sign_src
pub fn copy_sign<FT2: FloatTraits>(&self, sign_src: &Float<FT2>) -> Self
[src]
construct a Float
from self
but with the sign of sign_src
pub fn compare(
&self,
rhs: &Self,
quiet: bool,
fp_state: Option<&mut FPState>
) -> Option<Ordering>
[src]
&self,
rhs: &Self,
quiet: bool,
fp_state: Option<&mut FPState>
) -> Option<Ordering>
compare two Float
values
pub fn compare_quiet(
&self,
rhs: &Self,
fp_state: Option<&mut FPState>
) -> Option<Ordering>
[src]
&self,
rhs: &Self,
fp_state: Option<&mut FPState>
) -> Option<Ordering>
compare two Float
values
pub fn compare_signaling(
&self,
rhs: &Self,
fp_state: Option<&mut FPState>
) -> Option<Ordering>
[src]
&self,
rhs: &Self,
fp_state: Option<&mut FPState>
) -> Option<Ordering>
compare two Float
values
pub fn from_bigint_with_traits(
value: BigInt,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: BigInt,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_bigint(
value: BigInt,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: BigInt,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_biguint_with_traits(
value: BigUint,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: BigUint,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_biguint(
value: BigUint,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: BigUint,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_u8_with_traits(
value: u8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: u8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_u8(
value: u8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: u8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_u16_with_traits(
value: u16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: u16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_u16(
value: u16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: u16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_u32_with_traits(
value: u32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: u32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_u32(
value: u32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: u32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_u64_with_traits(
value: u64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: u64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_u64(
value: u64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: u64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_u128_with_traits(
value: u128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: u128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_u128(
value: u128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: u128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_usize_with_traits(
value: usize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: usize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_usize(
value: usize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: usize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_i8_with_traits(
value: i8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: i8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_i8(
value: i8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: i8,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_i16_with_traits(
value: i16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: i16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_i16(
value: i16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: i16,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_i32_with_traits(
value: i32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: i32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_i32(
value: i32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: i32,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_i64_with_traits(
value: i64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: i64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_i64(
value: i64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: i64,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_i128_with_traits(
value: i128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: i128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_i128(
value: i128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: i128,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn from_isize_with_traits(
value: isize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
[src]
value: isize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>,
traits: FT
) -> Self
convert from integer to floating-point
pub fn from_isize(
value: isize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
[src]
value: isize,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self where
FT: Default,
convert from integer to floating-point
pub fn to_bigint(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<BigInt>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<BigInt>
convert from floating-point to integer
pub fn to_biguint(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<BigUint>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<BigUint>
convert from floating-point to integer
pub fn to_u8(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u8>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u8>
convert from floating-point to integer
pub fn to_u16(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u16>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u16>
convert from floating-point to integer
pub fn to_u32(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u32>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u32>
convert from floating-point to integer
pub fn to_u64(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u64>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u64>
convert from floating-point to integer
pub fn to_u128(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u128>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<u128>
convert from floating-point to integer
pub fn to_usize(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<usize>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<usize>
convert from floating-point to integer
pub fn to_i8(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i8>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i8>
convert from floating-point to integer
pub fn to_i16(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i16>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i16>
convert from floating-point to integer
pub fn to_i32(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i32>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i32>
convert from floating-point to integer
pub fn to_i64(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i64>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i64>
convert from floating-point to integer
pub fn to_i128(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i128>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<i128>
convert from floating-point to integer
pub fn to_isize(
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<isize>
[src]
&self,
exact: bool,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Option<isize>
convert from floating-point to integer
pub fn rsqrt(
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
[src]
&self,
rounding_mode: Option<RoundingMode>,
fp_state: Option<&mut FPState>
) -> Self
reciprocal square root -- computes 1 / sqrt(self)
Trait Implementations
impl<FT: Clone + FloatTraits> Clone for Float<FT> where
FT::Bits: Clone,
[src]
FT::Bits: Clone,
impl<FT: Copy + FloatTraits> Copy for Float<FT> where
FT::Bits: Copy,
[src]
FT::Bits: Copy,
impl<Bits: FloatBitsType, FT: FloatTraits<Bits = Bits>> Debug for Float<FT>
[src]
impl<FT: FloatTraits + Default> Default for Float<FT>
[src]
impl From<DynamicFloat> for Float<FloatProperties>
[src]
fn from(value: DynamicFloat) -> Self
[src]
impl From<Float<FloatProperties>> for DynamicFloat
[src]
fn from(value: Float<FloatProperties>) -> Self
[src]
Auto Trait Implementations
impl<FT> RefUnwindSafe for Float<FT> where
FT: RefUnwindSafe,
<FT as FloatTraits>::Bits: RefUnwindSafe,
FT: RefUnwindSafe,
<FT as FloatTraits>::Bits: RefUnwindSafe,
impl<FT> Send for Float<FT> where
FT: Send,
<FT as FloatTraits>::Bits: Send,
FT: Send,
<FT as FloatTraits>::Bits: Send,
impl<FT> Sync for Float<FT> where
FT: Sync,
<FT as FloatTraits>::Bits: Sync,
FT: Sync,
<FT as FloatTraits>::Bits: Sync,
impl<FT> Unpin for Float<FT> where
FT: Unpin,
<FT as FloatTraits>::Bits: Unpin,
FT: Unpin,
<FT as FloatTraits>::Bits: Unpin,
impl<FT> UnwindSafe for Float<FT> where
FT: UnwindSafe,
<FT as FloatTraits>::Bits: UnwindSafe,
FT: UnwindSafe,
<FT as FloatTraits>::Bits: UnwindSafe,
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>,