pub unsafe trait Floatwhere
Self: Float + 'static + Any + CloneToUninit + Copy + Debug + Default + FloatToInt<i128> + FloatToInt<i16> + FloatToInt<i32> + FloatToInt<i64> + FloatToInt<i8> + FloatToInt<isize> + FloatToInt<u128> + FloatToInt<u16> + FloatToInt<u32> + FloatToInt<u64> + FloatToInt<u8> + FloatToInt<usize> + Freeze + From<bool> + From<i8> + From<u8> + PartialEq + PartialOrd + Product + RefUnwindSafe + Send + Sum + Sync + Thin + ToOwned + TryFrom<bool, Error = Infallible> + TryFrom<i8, Error = Infallible> + TryFrom<u8, Error = Infallible> + Unpin + UnwindSafe + UseCloned + Add<Output = Self> + Div<Output = Self> + Mul<Output = Self> + Neg<Output = Self> + Rem<Output = Self> + Sub<Output = Self> + AddAssign + DivAssign + MulAssign + RemAssign + SubAssign,{
type Bytes: Array<Scalar = u8> + 'static + Any + CloneToUninit + ConstParamTy_ + Copy + Debug + Eq + Freeze + Hash + Ord + PartialEq + PartialEq<[u8]> + PartialOrd + RefUnwindSafe + Send + Sync + ToOwned + Unpin + UnwindSafe;
type Bits: Uint<Bytes = Self::Bytes>;
Show 37 associated constants and 40 methods
const RADIX: u32;
const MANTISSA_DIGITS: u32;
const DIGITS: u32;
const EPSILON: Self;
const MIN: Self;
const MIN_POSITIVE: Self;
const MAX: Self;
const INFINITY: Self;
const NEG_INFINITY: Self;
const NAN: Self;
const EGAMMA: Self;
const PHI: Self;
const E: Self;
const PI: Self;
const TAU: Self;
const LOG2_10: Self;
const LOG2_E: Self;
const LN_2: Self;
const LN_10: Self;
const LOG10_2: Self;
const LOG10_E: Self;
const SQRT_2: Self;
const SQRT_3: Self;
const FRAC_1_PI: Self;
const FRAC_1_SQRT_2: Self;
const FRAC_1_SQRT_3: Self;
const FRAC_1_SQRT_PI: Self;
const FRAC_1_SQRT_2PI: Self;
const FRAC_2_PI: Self;
const FRAC_2_SQRT_PI: Self;
const FRAC_PI_2: Self;
const FRAC_PI_3: Self;
const FRAC_PI_4: Self;
const FRAC_PI_6: Self;
const FRAC_PI_8: Self;
const ZERO: Self;
const ONE: Self;
// Required methods
fn from_f16(value: f16) -> Self;
fn from_f64_lossy(value: f64) -> Self;
fn from_f128_lossy(value: f128) -> Self;
fn from_ne_bytes(bytes: Self::Bytes) -> Self;
fn from_le_bytes(bytes: Self::Bytes) -> Self;
fn from_be_bytes(bytes: Self::Bytes) -> Self;
fn from_bits(bits: Self::Bits) -> Self;
fn abs(self) -> Self;
fn recip(self) -> Self;
fn midpoint(self, rhs: Self) -> Self;
fn to_radians(self) -> Self;
fn to_degrees(self) -> Self;
fn next_down(self) -> Self;
fn next_up(self) -> Self;
fn signum(self) -> Self;
fn copysign(self, sign: Self) -> Self;
fn algebraic_add(self, rhs: Self) -> Self;
fn algebraic_sub(self, rhs: Self) -> Self;
fn algebraic_mul(self, rhs: Self) -> Self;
fn algebraic_div(self, rhs: Self) -> Self;
fn algebraic_rem(self, rhs: Self) -> Self;
fn classify(self) -> FpCategory;
fn is_nan(self) -> bool;
fn is_infinite(self) -> bool;
fn is_finite(self) -> bool;
fn is_normal(self) -> bool;
fn is_subnormal(self) -> bool;
fn is_sign_negative(self) -> bool;
fn is_sign_positive(self) -> bool;
fn clamp(self, min: Self, max: Self) -> Self;
fn min(self, rhs: Self) -> Self;
fn max(self, rhs: Self) -> Self;
fn minimum(self, rhs: Self) -> Self;
fn maximum(self, rhs: Self) -> Self;
fn total_cmp(&self, rhs: &Self) -> Ordering;
unsafe fn to_int_unchecked<T>(self) -> T
where Self: FloatToInt<T>;
fn to_bits(self) -> Self::Bits;
fn to_ne_bytes(self) -> Self::Bytes;
fn to_le_bytes(self) -> Self::Bytes;
fn to_be_bytes(self) -> Self::Bytes;
}Expand description
A generic, floating-point real.
This trait abstracts the interfaces defined by f16, f32, f64, and f128 so that these may be used as a single type.
The following trait(s) are not required due to some floating-point types not implementing them:
Display: Not implement byf128From<f16>: Not implement byf32FromStr: Not implement byf128LowerExp: Not implement byf128ToString: Not implemented byf128UpperExp: Not implement byf128
These trait(s) will be required when standard support arrives.
See also FloatLeast32 and FloatLeast64.
See also StdFloat.
§Safety
Bits must be an unsigned, integral type of the same width as Self so that transmutations between the two is always valid.
Furthermore, all items must behave exactly as their standard counterparts.
Required Associated Constants§
Sourceconst MANTISSA_DIGITS: u32
const MANTISSA_DIGITS: u32
See f64::MANTISSA_DIGITS.
Sourceconst MIN_POSITIVE: Self
const MIN_POSITIVE: Self
See f64::MIN_POSITIVE.
Sourceconst NEG_INFINITY: Self
const NEG_INFINITY: Self
See f64::NEG_INFINITY.
Sourceconst FRAC_1_SQRT_2: Self
const FRAC_1_SQRT_2: Self
See f64::consts::FRAC_1_SQRT_2.
Sourceconst FRAC_1_SQRT_3: Self
Available on crate feature nightly_backports only.
const FRAC_1_SQRT_3: Self
nightly_backports only.See f64::consts::FRAC_1_SQRT_3.
Sourceconst FRAC_1_SQRT_PI: Self
Available on crate feature nightly_backports only.
const FRAC_1_SQRT_PI: Self
nightly_backports only.See f64::consts::FRAC_1_SQRT_PI.
Sourceconst FRAC_1_SQRT_2PI: Self
Available on crate feature nightly_backports only.
const FRAC_1_SQRT_2PI: Self
nightly_backports only.See f64::consts::FRAC_1_SQRT_PI.
Sourceconst FRAC_2_SQRT_PI: Self
const FRAC_2_SQRT_PI: Self
See f64::consts::FRAC_2_SQRT_PI.
Required Associated Types§
Sourcetype Bytes: Array<Scalar = u8> + 'static + Any + CloneToUninit + ConstParamTy_ + Copy + Debug + Eq + Freeze + Hash + Ord + PartialEq + PartialEq<[u8]> + PartialOrd + RefUnwindSafe + Send + Sync + ToOwned + Unpin + UnwindSafe
type Bytes: Array<Scalar = u8> + 'static + Any + CloneToUninit + ConstParamTy_ + Copy + Debug + Eq + Freeze + Hash + Ord + PartialEq + PartialEq<[u8]> + PartialOrd + RefUnwindSafe + Send + Sync + ToOwned + Unpin + UnwindSafe
Required Methods§
Sourcefn from_f64_lossy(value: f64) -> Self
fn from_f64_lossy(value: f64) -> Self
Equivalent to value as Self.
Note that when f128 stabilises (see #116909), this constructor may be depcreated in favour of from_f128_lossy.
§Examples
use multitype::Float;
let v0 = 0.062_500f64 as f32;
let v1 = f32::from_f64_lossy(0.062_500);
assert_eq!(v0.to_bits(), v1.to_bits());Sourcefn from_f128_lossy(value: f128) -> Self
Available on crate feature f128 only.
fn from_f128_lossy(value: f128) -> Self
f128 only.Equivalent to value as Self.
§Examples
use multitype::Float;
let v0 = 0.062_500f128 as f32;
let v1 = f32::from_f128_lossy(0.062_500);
assert_eq!(v0.to_bits(), v1.to_bits());Sourcefn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
See f64::from_ne_bytes.
Sourcefn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
See f64::from_le_bytes.
Sourcefn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
See f64::from_be_bytes.
Sourcefn to_radians(self) -> Self
fn to_radians(self) -> Self
See f64::to_radians.
Sourcefn to_degrees(self) -> Self
fn to_degrees(self) -> Self
See f64::to_degrees.
Sourcefn algebraic_add(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
fn algebraic_add(self, rhs: Self) -> Self
nightly_backports only.See f64::algebraic_add.
Sourcefn algebraic_sub(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
fn algebraic_sub(self, rhs: Self) -> Self
nightly_backports only.See f64::algebraic_sub.
Sourcefn algebraic_mul(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
fn algebraic_mul(self, rhs: Self) -> Self
nightly_backports only.See f64::algebraic_mul.
Sourcefn algebraic_div(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
fn algebraic_div(self, rhs: Self) -> Self
nightly_backports only.See f64::algebraic_div.
Sourcefn algebraic_rem(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
fn algebraic_rem(self, rhs: Self) -> Self
nightly_backports only.See f64::algebraic_rem.
Sourcefn classify(self) -> FpCategory
fn classify(self) -> FpCategory
Sourcefn is_infinite(self) -> bool
fn is_infinite(self) -> bool
See f64::is_infinite.
Sourcefn is_subnormal(self) -> bool
fn is_subnormal(self) -> bool
See f64::is_subnormal.
Sourcefn is_sign_negative(self) -> bool
fn is_sign_negative(self) -> bool
See f64::is_sign_negative.
Sourcefn is_sign_positive(self) -> bool
fn is_sign_positive(self) -> bool
See f64::is_sign_positive.
Sourceunsafe fn to_int_unchecked<T>(self) -> Twhere
Self: FloatToInt<T>,
unsafe fn to_int_unchecked<T>(self) -> Twhere
Self: FloatToInt<T>,
See f64::to_int_unchecked.
Our multitype::FloatToInt<T> trait can be expected to be as equivalent to core::convert::FloatToInt<T> as possible.
Sourcefn to_ne_bytes(self) -> Self::Bytes
fn to_ne_bytes(self) -> Self::Bytes
See f64::to_ne_bytes.
Sourcefn to_le_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
See f64::to_le_bytes.
Sourcefn to_be_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
See f64::to_be_bytes.
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.
Implementations on Foreign Types§
Source§impl Float for f16
Available on crate feature f16 only.
impl Float for f16
f16 only.const RADIX: u32 = 2u32
const MANTISSA_DIGITS: u32 = 11u32
const DIGITS: u32 = 3u32
const EPSILON: Self = 9.7656E-4f16
const MIN: Self = -65504f16
const MIN_POSITIVE: Self = 6.1035E-5f16
const MAX: Self = 65504f16
const ZERO: Self = 0f16
const ONE: Self = 1f16
const INFINITY: Self = +Inf_f16
const NEG_INFINITY: Self = -Inf_f16
const NAN: Self = NaN_f16
const E: Self = 2.7188f16
const PI: Self = 3.1406f16
const TAU: Self = 6.2813f16
const LOG2_10: Self = 3.3223f16
const LOG2_E: Self = 1.4424f16
const LN_2: Self = 0.69336f16
const LN_10: Self = 2.3027f16
const LOG10_2: Self = 0.30103f16
const LOG10_E: Self = 0.43433f16
const SQRT_2: Self = 1.4141f16
const FRAC_1_PI: Self = 0.31836f16
const FRAC_1_SQRT_2: Self = 0.70703f16
Source§const FRAC_1_SQRT_3: Self = 0.57715f16
const FRAC_1_SQRT_3: Self = 0.57715f16
nightly_backports only.Source§const FRAC_1_SQRT_PI: Self = 0.56396f16
const FRAC_1_SQRT_PI: Self = 0.56396f16
nightly_backports only.Source§const FRAC_1_SQRT_2PI: Self = 0.39893f16
const FRAC_1_SQRT_2PI: Self = 0.39893f16
nightly_backports only.const FRAC_2_PI: Self = 0.63672f16
const FRAC_2_SQRT_PI: Self = 1.1279f16
const FRAC_PI_2: Self = 1.5703f16
const FRAC_PI_3: Self = 1.0469f16
const FRAC_PI_4: Self = 0.78515f16
const FRAC_PI_6: Self = 0.52344f16
const FRAC_PI_8: Self = 0.39258f16
type Bytes = [u8; 2]
type Bits = u16
fn from_f16(value: f16) -> Self
fn from_f64_lossy(value: f64) -> Self
Source§fn from_f128_lossy(value: f128) -> Self
fn from_f128_lossy(value: f128) -> Self
f128 only.fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_bits(bits: Self::Bits) -> Self
fn abs(self) -> Self
fn recip(self) -> Self
fn midpoint(self, rhs: Self) -> Self
fn to_radians(self) -> Self
fn to_degrees(self) -> Self
fn next_down(self) -> Self
fn next_up(self) -> Self
fn signum(self) -> Self
fn copysign(self, sign: Self) -> Self
Source§fn algebraic_add(self, rhs: Self) -> Self
fn algebraic_add(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_sub(self, rhs: Self) -> Self
fn algebraic_sub(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_mul(self, rhs: Self) -> Self
fn algebraic_mul(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_div(self, rhs: Self) -> Self
fn algebraic_div(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_rem(self, rhs: Self) -> Self
fn algebraic_rem(self, rhs: Self) -> Self
nightly_backports only.fn classify(self) -> FpCategory
fn is_nan(self) -> bool
fn is_infinite(self) -> bool
fn is_finite(self) -> bool
fn is_normal(self) -> bool
fn is_subnormal(self) -> bool
fn is_sign_negative(self) -> bool
fn is_sign_positive(self) -> bool
fn clamp(self, min: Self, max: Self) -> Self
fn min(self, rhs: Self) -> Self
fn max(self, rhs: Self) -> Self
fn total_cmp(&self, rhs: &Self) -> Ordering
unsafe fn to_int_unchecked<T>(self) -> Twhere
Self: FloatToInt<T>,
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
fn to_bits(self) -> Self::Bits
Source§impl Float for f32
impl Float for f32
const RADIX: u32 = 2u32
const MANTISSA_DIGITS: u32 = 24u32
const DIGITS: u32 = 6u32
const EPSILON: Self = 1.1920929E-7f32
const MIN: Self = -3.40282347E+38f32
const MIN_POSITIVE: Self = 1.17549435E-38f32
const MAX: Self = 3.40282347E+38f32
const ZERO: Self = 0f32
const ONE: Self = 1f32
const INFINITY: Self = +Inf_f32
const NEG_INFINITY: Self = -Inf_f32
const NAN: Self = NaN_f32
const E: Self = 2.71828175f32
const PI: Self = 3.14159274f32
const TAU: Self = 6.28318548f32
const LOG2_10: Self = 3.32192802f32
const LOG2_E: Self = 1.44269502f32
const LN_2: Self = 0.693147182f32
const LN_10: Self = 2.30258512f32
const LOG10_2: Self = 0.30103001f32
const LOG10_E: Self = 0.434294492f32
const SQRT_2: Self = 1.41421354f32
const FRAC_1_PI: Self = 0.318309873f32
const FRAC_1_SQRT_2: Self = 0.707106769f32
Source§const FRAC_1_SQRT_3: Self = 0.577350259f32
const FRAC_1_SQRT_3: Self = 0.577350259f32
nightly_backports only.Source§const FRAC_1_SQRT_PI: Self = 0.564189613f32
const FRAC_1_SQRT_PI: Self = 0.564189613f32
nightly_backports only.Source§const FRAC_1_SQRT_2PI: Self = 0.398942292f32
const FRAC_1_SQRT_2PI: Self = 0.398942292f32
nightly_backports only.const FRAC_2_PI: Self = 0.636619746f32
const FRAC_2_SQRT_PI: Self = 1.12837923f32
const FRAC_PI_2: Self = 1.57079637f32
const FRAC_PI_3: Self = 1.04719758f32
const FRAC_PI_4: Self = 0.785398185f32
const FRAC_PI_6: Self = 0.52359879f32
const FRAC_PI_8: Self = 0.392699093f32
type Bytes = [u8; 4]
type Bits = u32
fn from_f64_lossy(value: f64) -> Self
Source§fn from_f128_lossy(value: f128) -> Self
fn from_f128_lossy(value: f128) -> Self
f128 only.fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_bits(bits: Self::Bits) -> Self
fn abs(self) -> Self
fn recip(self) -> Self
fn midpoint(self, rhs: Self) -> Self
fn to_radians(self) -> Self
fn to_degrees(self) -> Self
fn next_down(self) -> Self
fn next_up(self) -> Self
fn signum(self) -> Self
fn copysign(self, sign: Self) -> Self
Source§fn algebraic_add(self, rhs: Self) -> Self
fn algebraic_add(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_sub(self, rhs: Self) -> Self
fn algebraic_sub(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_mul(self, rhs: Self) -> Self
fn algebraic_mul(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_div(self, rhs: Self) -> Self
fn algebraic_div(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_rem(self, rhs: Self) -> Self
fn algebraic_rem(self, rhs: Self) -> Self
nightly_backports only.fn classify(self) -> FpCategory
fn is_nan(self) -> bool
fn is_infinite(self) -> bool
fn is_finite(self) -> bool
fn is_normal(self) -> bool
fn is_subnormal(self) -> bool
fn is_sign_negative(self) -> bool
fn is_sign_positive(self) -> bool
fn clamp(self, min: Self, max: Self) -> Self
fn min(self, rhs: Self) -> Self
fn max(self, rhs: Self) -> Self
fn total_cmp(&self, rhs: &Self) -> Ordering
unsafe fn to_int_unchecked<T>(self) -> Twhere
Self: FloatToInt<T>,
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
fn to_bits(self) -> Self::Bits
Source§impl Float for f64
impl Float for f64
const RADIX: u32 = 2u32
const MANTISSA_DIGITS: u32 = 53u32
const DIGITS: u32 = 15u32
const EPSILON: Self = 2.2204460492503131E-16f64
const MIN: Self = -1.7976931348623157E+308f64
const MIN_POSITIVE: Self = 2.2250738585072014E-308f64
const MAX: Self = 1.7976931348623157E+308f64
const ZERO: Self = 0f64
const ONE: Self = 1f64
const INFINITY: Self = +Inf_f64
const NEG_INFINITY: Self = -Inf_f64
const NAN: Self = NaN_f64
Source§const EGAMMA: Self = 0.57721566490153287f64
const EGAMMA: Self = 0.57721566490153287f64
nightly_backports only.const E: Self = 2.7182818284590451f64
const PI: Self = 3.1415926535897931f64
const TAU: Self = 6.2831853071795862f64
const LOG2_10: Self = 3.3219280948873622f64
const LOG2_E: Self = 1.4426950408889634f64
const LN_2: Self = 0.69314718055994529f64
const LN_10: Self = 2.3025850929940459f64
const LOG10_2: Self = 0.3010299956639812f64
const LOG10_E: Self = 0.43429448190325182f64
const SQRT_2: Self = 1.4142135623730951f64
const FRAC_1_PI: Self = 0.31830988618379069f64
const FRAC_1_SQRT_2: Self = 0.70710678118654757f64
Source§const FRAC_1_SQRT_3: Self = 0.57735026918962573f64
const FRAC_1_SQRT_3: Self = 0.57735026918962573f64
nightly_backports only.Source§const FRAC_1_SQRT_PI: Self = 0.56418958354775628f64
const FRAC_1_SQRT_PI: Self = 0.56418958354775628f64
nightly_backports only.Source§const FRAC_1_SQRT_2PI: Self = 0.3989422804014327f64
const FRAC_1_SQRT_2PI: Self = 0.3989422804014327f64
nightly_backports only.const FRAC_2_PI: Self = 0.63661977236758138f64
const FRAC_2_SQRT_PI: Self = 1.1283791670955126f64
const FRAC_PI_2: Self = 1.5707963267948966f64
const FRAC_PI_3: Self = 1.0471975511965979f64
const FRAC_PI_4: Self = 0.78539816339744828f64
const FRAC_PI_6: Self = 0.52359877559829893f64
const FRAC_PI_8: Self = 0.39269908169872414f64
type Bytes = [u8; 8]
type Bits = u64
fn from_f64_lossy(value: f64) -> Self
Source§fn from_f128_lossy(value: f128) -> Self
fn from_f128_lossy(value: f128) -> Self
f128 only.fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_bits(bits: Self::Bits) -> Self
fn abs(self) -> Self
fn recip(self) -> Self
fn midpoint(self, rhs: Self) -> Self
fn to_radians(self) -> Self
fn to_degrees(self) -> Self
fn next_down(self) -> Self
fn next_up(self) -> Self
fn signum(self) -> Self
fn copysign(self, sign: Self) -> Self
Source§fn algebraic_add(self, rhs: Self) -> Self
fn algebraic_add(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_sub(self, rhs: Self) -> Self
fn algebraic_sub(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_mul(self, rhs: Self) -> Self
fn algebraic_mul(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_div(self, rhs: Self) -> Self
fn algebraic_div(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_rem(self, rhs: Self) -> Self
fn algebraic_rem(self, rhs: Self) -> Self
nightly_backports only.fn classify(self) -> FpCategory
fn is_nan(self) -> bool
fn is_infinite(self) -> bool
fn is_finite(self) -> bool
fn is_normal(self) -> bool
fn is_subnormal(self) -> bool
fn is_sign_negative(self) -> bool
fn is_sign_positive(self) -> bool
fn clamp(self, min: Self, max: Self) -> Self
fn min(self, rhs: Self) -> Self
fn max(self, rhs: Self) -> Self
fn total_cmp(&self, rhs: &Self) -> Ordering
unsafe fn to_int_unchecked<T>(self) -> Twhere
Self: FloatToInt<T>,
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
fn to_bits(self) -> Self::Bits
Source§impl Float for f128
Available on crate feature f128 only.
impl Float for f128
f128 only.const RADIX: u32 = 2u32
const MANTISSA_DIGITS: u32 = 113u32
const DIGITS: u32 = 33u32
const EPSILON: Self = 1.92592994438723585305597794258492732E-34f128
const MIN: Self = -1.18973149535723176508575932662800702E+4932f128
const MIN_POSITIVE: Self = 3.3621031431120935062626778173217526E-4932f128
const MAX: Self = 1.18973149535723176508575932662800702E+4932f128
const ZERO: Self = 0f128
const ONE: Self = 1f128
const INFINITY: Self = +Inf_f128
const NEG_INFINITY: Self = -Inf_f128
const NAN: Self = NaN_f128
Source§const EGAMMA: Self = 0.577215664901532860606512090082402471f128
const EGAMMA: Self = 0.577215664901532860606512090082402471f128
nightly_backports only.Source§const PHI: Self = 1.61803398874989484820458683436563816f128
const PHI: Self = 1.61803398874989484820458683436563816f128
nightly_backports only.const E: Self = 2.71828182845904523536028747135266231f128
const PI: Self = 3.1415926535897932384626433832795028f128
const TAU: Self = 6.28318530717958647692528676655900559f128
const LOG2_10: Self = 3.32192809488736234787031942948939029f128
const LOG2_E: Self = 1.44269504088896340735992468100189204f128
const LN_2: Self = 0.693147180559945309417232121458176575f128
const LN_10: Self = 2.30258509299404568401799145468436418f128
const LOG10_2: Self = 0.30102999566398119521373889472449302f128
const LOG10_E: Self = 0.434294481903251827651128918916605096f128
const SQRT_2: Self = 1.41421356237309504880168872420969798f128
Source§const SQRT_3: Self = 1.73205080756887729352744634150587232f128
const SQRT_3: Self = 1.73205080756887729352744634150587232f128
nightly_backports only.const FRAC_1_PI: Self = 0.318309886183790671537767526745028737f128
const FRAC_1_SQRT_2: Self = 0.707106781186547524400844362104848992f128
Source§const FRAC_1_SQRT_3: Self = 0.577350269189625764509148780501957409f128
const FRAC_1_SQRT_3: Self = 0.577350269189625764509148780501957409f128
nightly_backports only.Source§const FRAC_1_SQRT_PI: Self = 0.564189583547756286948079451560772632f128
const FRAC_1_SQRT_PI: Self = 0.564189583547756286948079451560772632f128
nightly_backports only.Source§const FRAC_1_SQRT_2PI: Self = 0.398942280401432677939946059934381874f128
const FRAC_1_SQRT_2PI: Self = 0.398942280401432677939946059934381874f128
nightly_backports only.const FRAC_2_PI: Self = 0.636619772367581343075535053490057474f128
const FRAC_2_SQRT_PI: Self = 1.12837916709551257389615890312154526f128
const FRAC_PI_2: Self = 1.5707963267948966192313216916397514f128
const FRAC_PI_3: Self = 1.04719755119659774615421446109316766f128
const FRAC_PI_4: Self = 0.785398163397448309615660845819875699f128
const FRAC_PI_6: Self = 0.523598775598298873077107230546583832f128
const FRAC_PI_8: Self = 0.39269908169872415480783042290993785f128
type Bytes = [u8; 16]
type Bits = u128
fn from_f64_lossy(value: f64) -> Self
fn from_f128_lossy(value: f128) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_bits(bits: Self::Bits) -> Self
fn abs(self) -> Self
fn recip(self) -> Self
fn midpoint(self, rhs: Self) -> Self
fn to_radians(self) -> Self
fn to_degrees(self) -> Self
fn next_down(self) -> Self
fn next_up(self) -> Self
fn signum(self) -> Self
fn copysign(self, sign: Self) -> Self
Source§fn algebraic_add(self, rhs: Self) -> Self
fn algebraic_add(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_sub(self, rhs: Self) -> Self
fn algebraic_sub(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_mul(self, rhs: Self) -> Self
fn algebraic_mul(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_div(self, rhs: Self) -> Self
fn algebraic_div(self, rhs: Self) -> Self
nightly_backports only.Source§fn algebraic_rem(self, rhs: Self) -> Self
fn algebraic_rem(self, rhs: Self) -> Self
nightly_backports only.