pub struct F128 { /* private fields */ }
Expand description
The bit representation of a binary128 floating-point number (f128
).
This type can be used to
- convert between fixed-point numbers and the bit representation of 128-bit floating-point numbers.
- compare fixed-point numbers and the bit representation of 128-bit floating-point numbers.
Examples
use fixed::{types::I16F16, F128};
assert_eq!(I16F16::ONE.to_num::<F128>(), F128::ONE);
assert_eq!(I16F16::from_num(F128::ONE), I16F16::ONE);
// fixed-point numbers can be compared directly to F128 values
assert!(I16F16::from_num(1.5) > F128::ONE);
assert!(I16F16::from_num(0.5) < F128::ONE);
Implementations
sourceimpl F128
impl F128
sourcepub const MIN_POSITIVE_SUB: F128 = _
pub const MIN_POSITIVE_SUB: F128 = _
Smallest positive subnormal number.
sourcepub const MIN_POSITIVE: F128 = _
pub const MIN_POSITIVE: F128 = _
Smallest positive normal number.
sourcepub const NEG_INFINITY: F128 = _
pub const NEG_INFINITY: F128 = _
Negative infinity (−∞).
sourcepub const MANTISSA_DIGITS: u32 = 113u32
pub const MANTISSA_DIGITS: u32 = 113u32
Number of significant digits in base 2.
sourcepub const fn from_be_bytes(bytes: [u8; 16]) -> F128
pub const fn from_be_bytes(bytes: [u8; 16]) -> F128
Creates a number from a byte array in big-endian byte order.
sourcepub const fn from_le_bytes(bytes: [u8; 16]) -> F128
pub const fn from_le_bytes(bytes: [u8; 16]) -> F128
Creates a number from a byte array in little-endian byte order.
sourcepub const fn from_ne_bytes(bytes: [u8; 16]) -> F128
pub const fn from_ne_bytes(bytes: [u8; 16]) -> F128
Creates a number from a byte array in native-endian byte order.
sourcepub const fn to_be_bytes(self) -> [u8; 16]
pub const fn to_be_bytes(self) -> [u8; 16]
Returns the memory representation of the number as a byte array in big-endian byte order.
sourcepub const fn to_le_bytes(self) -> [u8; 16]
pub const fn to_le_bytes(self) -> [u8; 16]
Returns the memory representation of the number as a byte array in little-endian byte order.
sourcepub const fn to_ne_bytes(self) -> [u8; 16]
pub const fn to_ne_bytes(self) -> [u8; 16]
Returns the memory representation of the number as a byte array in native-endian byte order.
sourcepub const fn is_infinite(self) -> bool
pub const fn is_infinite(self) -> bool
sourcepub const fn is_subnormal(self) -> bool
pub const fn is_subnormal(self) -> bool
sourcepub const fn is_normal(self) -> bool
pub const fn is_normal(self) -> bool
Returns true
if the number is neither zero, infinite, subnormal, or NaN.
Example
use fixed::F128;
assert!(F128::MIN.is_normal());
assert!(F128::MIN_POSITIVE.is_normal());
assert!(F128::MAX.is_normal());
assert!(!F128::ZERO.is_normal());
assert!(!F128::MIN_POSITIVE_SUB.is_normal());
assert!(!F128::INFINITY.is_normal());
assert!(!F128::NAN.is_normal());
sourcepub const fn classify(self) -> FpCategory
pub const fn classify(self) -> FpCategory
Returns the floating point category of the number.
If only one property is going to be tested, it is generally faster to use the specific predicate instead.
Example
use core::num::FpCategory;
use fixed::F128;
assert_eq!(F128::ZERO.classify(), FpCategory::Zero);
assert_eq!(F128::MIN_POSITIVE_SUB.classify(), FpCategory::Subnormal);
assert_eq!(F128::MIN_POSITIVE.classify(), FpCategory::Normal);
assert_eq!(F128::INFINITY.classify(), FpCategory::Infinite);
assert_eq!(F128::NAN.classify(), FpCategory::Nan);
sourcepub const fn abs(self) -> F128
pub const fn abs(self) -> F128
Returns the absolute value of the number.
The only difference possible between the input value and the returned value is in the sign bit, which is always cleared in the return value.
Example
use fixed::F128;
// -0 == +0, but -0 bits != +0 bits
assert_eq!(F128::NEG_ZERO, F128::ZERO);
assert_ne!(F128::NEG_ZERO.to_bits(), F128::ZERO.to_bits());
assert_eq!(F128::NEG_ZERO.abs().to_bits(), F128::ZERO.to_bits());
assert_eq!(F128::NEG_INFINITY.abs(), F128::INFINITY);
assert_eq!(F128::MIN.abs(), F128::MAX);
assert!(F128::NAN.abs().is_nan());
sourcepub const fn signum(self) -> F128
pub const fn signum(self) -> F128
Returns a number that represents the sign of the input value.
- 1 if the number is positive, +0, or +∞
- −1 if the number is negative, −0, or −∞
- NaN if the number is NaN
Example
use fixed::F128;
assert_eq!(F128::ONE.signum(), F128::ONE);
assert_eq!(F128::INFINITY.signum(), F128::ONE);
assert_eq!(F128::NEG_ZERO.signum(), F128::NEG_ONE);
assert_eq!(F128::MIN.signum(), F128::NEG_ONE);
assert!(F128::NAN.signum().is_nan());
sourcepub const fn copysign(self, sign: F128) -> F128
pub const fn copysign(self, sign: F128) -> F128
Returns a number composed of the magnitude of self
and the sign of sign
.
Example
use fixed::F128;
assert_eq!(F128::ONE.copysign(F128::NEG_ZERO), F128::NEG_ONE);
assert_eq!(F128::ONE.copysign(F128::ZERO), F128::ONE);
assert_eq!(F128::NEG_ONE.copysign(F128::NEG_INFINITY), F128::NEG_ONE);
assert_eq!(F128::NEG_ONE.copysign(F128::INFINITY), F128::ONE);
assert!(F128::NAN.copysign(F128::ONE).is_nan());
assert!(F128::NAN.copysign(F128::ONE).is_sign_positive());
assert!(F128::NAN.copysign(F128::NEG_ONE).is_sign_negative());
sourcepub const fn is_sign_positive(self) -> bool
pub const fn is_sign_positive(self) -> bool
Returns true
if the number has a positive sign, including +0, +∞,
and NaN without a negative sign bit.
Example
use fixed::F128;
assert!(F128::ZERO.is_sign_positive());
assert!(F128::MAX.is_sign_positive());
assert!(F128::INFINITY.is_sign_positive());
assert!(!F128::NEG_ZERO.is_sign_positive());
assert!(!F128::MIN.is_sign_positive());
assert!(!F128::NEG_INFINITY.is_sign_positive());
sourcepub const fn is_sign_negative(self) -> bool
pub const fn is_sign_negative(self) -> bool
Returns true
if the number has a negative sign, including −0,
−∞, and NaN with a negative sign bit.
Example
use fixed::F128;
assert!(F128::NEG_ZERO.is_sign_negative());
assert!(F128::MIN.is_sign_negative());
assert!(F128::NEG_INFINITY.is_sign_negative());
assert!(!F128::ZERO.is_sign_negative());
assert!(!F128::MAX.is_sign_negative());
assert!(!F128::INFINITY.is_sign_negative());
sourcepub const fn total_cmp(&self, other: &F128) -> Ordering
pub const fn total_cmp(&self, other: &F128) -> Ordering
Returns the ordering between self
and other
.
Unlike the PartialOrd
implementation, this method always returns an
order in the following sequence:
- NaN with the sign bit set
- −∞
- negative normal numbers
- negative subnormal numbers
- −0
- +0
- positive subnormal numbers
- positive normal numbers
- +∞
- NaN with the sign bit cleared
Example
use core::cmp::Ordering;
use fixed::F128;
let neg_nan = F128::NAN.copysign(F128::NEG_ONE);
let pos_nan = F128::NAN.copysign(F128::ONE);
let neg_inf = F128::NEG_INFINITY;
let pos_inf = F128::INFINITY;
let neg_zero = F128::NEG_ZERO;
let pos_zero = F128::ZERO;
assert_eq!(neg_nan.total_cmp(&neg_inf), Ordering::Less);
assert_eq!(pos_nan.total_cmp(&pos_inf), Ordering::Greater);
assert_eq!(neg_zero.total_cmp(&pos_zero), Ordering::Less);
Trait Implementations
sourceimpl<Frac: LeEqU128> CheckedCast<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> CheckedCast<F128> for FixedI128<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU16> CheckedCast<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> CheckedCast<F128> for FixedI16<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU32> CheckedCast<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> CheckedCast<F128> for FixedI32<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU64> CheckedCast<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> CheckedCast<F128> for FixedI64<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU8> CheckedCast<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> CheckedCast<F128> for FixedI8<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU128> CheckedCast<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> CheckedCast<F128> for FixedU128<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU16> CheckedCast<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> CheckedCast<F128> for FixedU16<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU32> CheckedCast<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> CheckedCast<F128> for FixedU32<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU64> CheckedCast<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> CheckedCast<F128> for FixedU64<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU8> CheckedCast<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> CheckedCast<F128> for FixedU8<Frac>
sourcefn checked_cast(self) -> Option<F128>
fn checked_cast(self) -> Option<F128>
Casts the value.
sourceimpl<Frac: LeEqU128> CheckedCast<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> CheckedCast<FixedI128<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedI128<Frac>>
fn checked_cast(self) -> Option<FixedI128<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU16> CheckedCast<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> CheckedCast<FixedI16<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedI16<Frac>>
fn checked_cast(self) -> Option<FixedI16<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU32> CheckedCast<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> CheckedCast<FixedI32<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedI32<Frac>>
fn checked_cast(self) -> Option<FixedI32<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU64> CheckedCast<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> CheckedCast<FixedI64<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedI64<Frac>>
fn checked_cast(self) -> Option<FixedI64<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> CheckedCast<FixedI8<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedI8<Frac>>
fn checked_cast(self) -> Option<FixedI8<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU128> CheckedCast<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> CheckedCast<FixedU128<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedU128<Frac>>
fn checked_cast(self) -> Option<FixedU128<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU16> CheckedCast<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> CheckedCast<FixedU16<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedU16<Frac>>
fn checked_cast(self) -> Option<FixedU16<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU32> CheckedCast<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> CheckedCast<FixedU32<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedU32<Frac>>
fn checked_cast(self) -> Option<FixedU32<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU64> CheckedCast<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> CheckedCast<FixedU64<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedU64<Frac>>
fn checked_cast(self) -> Option<FixedU64<Frac>>
Casts the value.
sourceimpl<Frac: LeEqU8> CheckedCast<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> CheckedCast<FixedU8<Frac>> for F128
sourcefn checked_cast(self) -> Option<FixedU8<Frac>>
fn checked_cast(self) -> Option<FixedU8<Frac>>
Casts the value.
sourceimpl FromFixed for F128
impl FromFixed for F128
sourcefn from_fixed<F: Fixed>(src: F) -> Self
fn from_fixed<F: Fixed>(src: F) -> Self
Converts a fixed-point number to a floating-point number.
Rounding is to the nearest, with ties rounded to even.
Panics
When debug assertions are enabled, panics if the value
does not fit. When debug assertions are not enabled,
the wrapped value can be returned, but it is not
considered a breaking change if in the future it
panics; if wrapping is required use
wrapping_from_fixed
instead.
sourcefn checked_from_fixed<F: Fixed>(src: F) -> Option<Self>
fn checked_from_fixed<F: Fixed>(src: F) -> Option<Self>
Converts a fixed-point number to a floating-point
number if it fits, otherwise returns None
.
Rounding is to the nearest, with ties rounded to even.
sourcefn saturating_from_fixed<F: Fixed>(src: F) -> Self
fn saturating_from_fixed<F: Fixed>(src: F) -> Self
Converts a fixed-point number to a floating-point number, saturating if it does not fit.
Rounding is to the nearest, with ties rounded to even.
sourcefn wrapping_from_fixed<F: Fixed>(src: F) -> Self
fn wrapping_from_fixed<F: Fixed>(src: F) -> Self
Converts a fixed-point number to a floating-point number, wrapping if it does not fit.
Rounding is to the nearest, with ties rounded to even.
sourcefn overflowing_from_fixed<F: Fixed>(src: F) -> (Self, bool)
fn overflowing_from_fixed<F: Fixed>(src: F) -> (Self, bool)
sourcefn unwrapped_from_fixed<F: Fixed>(src: F) -> Self
fn unwrapped_from_fixed<F: Fixed>(src: F) -> Self
Converts a fixed-point number to a floating-point number, panicking if it does not fit.
Rounding is to the nearest, with ties rounded to even.
Panics
Panics if the value does not fit, even when debug assertions are not enabled.
sourceimpl<Frac: LeEqU16> LosslessTryFrom<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> LosslessTryFrom<FixedI16<Frac>> for F128
sourcefn lossless_try_from(src: FixedI16<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedI16<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU32> LosslessTryFrom<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> LosslessTryFrom<FixedI32<Frac>> for F128
sourcefn lossless_try_from(src: FixedI32<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedI32<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU64> LosslessTryFrom<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> LosslessTryFrom<FixedI64<Frac>> for F128
sourcefn lossless_try_from(src: FixedI64<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedI64<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU8> LosslessTryFrom<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> LosslessTryFrom<FixedI8<Frac>> for F128
sourcefn lossless_try_from(src: FixedI8<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedI8<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU16> LosslessTryFrom<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> LosslessTryFrom<FixedU16<Frac>> for F128
sourcefn lossless_try_from(src: FixedU16<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedU16<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU32> LosslessTryFrom<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> LosslessTryFrom<FixedU32<Frac>> for F128
sourcefn lossless_try_from(src: FixedU32<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedU32<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU64> LosslessTryFrom<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> LosslessTryFrom<FixedU64<Frac>> for F128
sourcefn lossless_try_from(src: FixedU64<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedU64<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl<Frac: LeEqU8> LosslessTryFrom<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> LosslessTryFrom<FixedU8<Frac>> for F128
sourcefn lossless_try_from(src: FixedU8<Frac>) -> Option<F128>
fn lossless_try_from(src: FixedU8<Frac>) -> Option<F128>
Converts a fixed-point number to a floating-point number.
This conversion actually never fails (infallible) but does not lose any precision (lossless).
sourceimpl LosslessTryFrom<i16> for F128
impl LosslessTryFrom<i16> for F128
sourcefn lossless_try_from(src: i16) -> Option<F128>
fn lossless_try_from(src: i16) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<i32> for F128
impl LosslessTryFrom<i32> for F128
sourcefn lossless_try_from(src: i32) -> Option<F128>
fn lossless_try_from(src: i32) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<i64> for F128
impl LosslessTryFrom<i64> for F128
sourcefn lossless_try_from(src: i64) -> Option<F128>
fn lossless_try_from(src: i64) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<i8> for F128
impl LosslessTryFrom<i8> for F128
sourcefn lossless_try_from(src: i8) -> Option<F128>
fn lossless_try_from(src: i8) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<u16> for F128
impl LosslessTryFrom<u16> for F128
sourcefn lossless_try_from(src: u16) -> Option<F128>
fn lossless_try_from(src: u16) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<u32> for F128
impl LosslessTryFrom<u32> for F128
sourcefn lossless_try_from(src: u32) -> Option<F128>
fn lossless_try_from(src: u32) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<u64> for F128
impl LosslessTryFrom<u64> for F128
sourcefn lossless_try_from(src: u64) -> Option<F128>
fn lossless_try_from(src: u64) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl LosslessTryFrom<u8> for F128
impl LosslessTryFrom<u8> for F128
sourcefn lossless_try_from(src: u8) -> Option<F128>
fn lossless_try_from(src: u8) -> Option<F128>
Converts an integer to a floating-point number.
This conversion actually never fails (infallible) and does not lose precision (lossless).
sourceimpl<Frac: LeEqU128> LossyFrom<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> LossyFrom<FixedI128<Frac>> for F128
sourcefn lossy_from(src: FixedI128<Frac>) -> F128
fn lossy_from(src: FixedI128<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU16> LossyFrom<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> LossyFrom<FixedI16<Frac>> for F128
sourcefn lossy_from(src: FixedI16<Frac>) -> F128
fn lossy_from(src: FixedI16<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU32> LossyFrom<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> LossyFrom<FixedI32<Frac>> for F128
sourcefn lossy_from(src: FixedI32<Frac>) -> F128
fn lossy_from(src: FixedI32<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU64> LossyFrom<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> LossyFrom<FixedI64<Frac>> for F128
sourcefn lossy_from(src: FixedI64<Frac>) -> F128
fn lossy_from(src: FixedI64<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU8> LossyFrom<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> LossyFrom<FixedI8<Frac>> for F128
sourcefn lossy_from(src: FixedI8<Frac>) -> F128
fn lossy_from(src: FixedI8<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU128> LossyFrom<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> LossyFrom<FixedU128<Frac>> for F128
sourcefn lossy_from(src: FixedU128<Frac>) -> F128
fn lossy_from(src: FixedU128<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU16> LossyFrom<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> LossyFrom<FixedU16<Frac>> for F128
sourcefn lossy_from(src: FixedU16<Frac>) -> F128
fn lossy_from(src: FixedU16<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU32> LossyFrom<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> LossyFrom<FixedU32<Frac>> for F128
sourcefn lossy_from(src: FixedU32<Frac>) -> F128
fn lossy_from(src: FixedU32<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU64> LossyFrom<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> LossyFrom<FixedU64<Frac>> for F128
sourcefn lossy_from(src: FixedU64<Frac>) -> F128
fn lossy_from(src: FixedU64<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU8> LossyFrom<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> LossyFrom<FixedU8<Frac>> for F128
sourcefn lossy_from(src: FixedU8<Frac>) -> F128
fn lossy_from(src: FixedU8<Frac>) -> F128
Converts a fixed-point number to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl LossyFrom<i128> for F128
impl LossyFrom<i128> for F128
sourcefn lossy_from(src: i128) -> F128
fn lossy_from(src: i128) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl LossyFrom<i16> for F128
impl LossyFrom<i16> for F128
sourcefn lossy_from(src: i16) -> F128
fn lossy_from(src: i16) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<i32> for F128
impl LossyFrom<i32> for F128
sourcefn lossy_from(src: i32) -> F128
fn lossy_from(src: i32) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<i64> for F128
impl LossyFrom<i64> for F128
sourcefn lossy_from(src: i64) -> F128
fn lossy_from(src: i64) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<i8> for F128
impl LossyFrom<i8> for F128
sourcefn lossy_from(src: i8) -> F128
fn lossy_from(src: i8) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<isize> for F128
impl LossyFrom<isize> for F128
sourcefn lossy_from(src: isize) -> F128
fn lossy_from(src: isize) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl LossyFrom<u128> for F128
impl LossyFrom<u128> for F128
sourcefn lossy_from(src: u128) -> F128
fn lossy_from(src: u128) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl LossyFrom<u16> for F128
impl LossyFrom<u16> for F128
sourcefn lossy_from(src: u16) -> F128
fn lossy_from(src: u16) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<u32> for F128
impl LossyFrom<u32> for F128
sourcefn lossy_from(src: u32) -> F128
fn lossy_from(src: u32) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<u64> for F128
impl LossyFrom<u64> for F128
sourcefn lossy_from(src: u64) -> F128
fn lossy_from(src: u64) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<u8> for F128
impl LossyFrom<u8> for F128
sourcefn lossy_from(src: u8) -> F128
fn lossy_from(src: u8) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) and actually does not lose precision (lossless).
sourceimpl LossyFrom<usize> for F128
impl LossyFrom<usize> for F128
sourcefn lossy_from(src: usize) -> F128
fn lossy_from(src: usize) -> F128
Converts an integer to a floating-point number.
This conversion never fails (infallible) but may lose precision (lossy). Rounding is to the nearest, with ties rounded to even.
sourceimpl<Frac: LeEqU128> OverflowingCast<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> OverflowingCast<F128> for FixedI128<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU16> OverflowingCast<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> OverflowingCast<F128> for FixedI16<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU32> OverflowingCast<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> OverflowingCast<F128> for FixedI32<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU64> OverflowingCast<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> OverflowingCast<F128> for FixedI64<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU8> OverflowingCast<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> OverflowingCast<F128> for FixedI8<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU128> OverflowingCast<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> OverflowingCast<F128> for FixedU128<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU16> OverflowingCast<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> OverflowingCast<F128> for FixedU16<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU32> OverflowingCast<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> OverflowingCast<F128> for FixedU32<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU64> OverflowingCast<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> OverflowingCast<F128> for FixedU64<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU8> OverflowingCast<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> OverflowingCast<F128> for FixedU8<Frac>
sourcefn overflowing_cast(self) -> (F128, bool)
fn overflowing_cast(self) -> (F128, bool)
Casts the value.
sourceimpl<Frac: LeEqU128> OverflowingCast<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> OverflowingCast<FixedI128<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedI128<Frac>, bool)
fn overflowing_cast(self) -> (FixedI128<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU16> OverflowingCast<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> OverflowingCast<FixedI16<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedI16<Frac>, bool)
fn overflowing_cast(self) -> (FixedI16<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU32> OverflowingCast<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> OverflowingCast<FixedI32<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedI32<Frac>, bool)
fn overflowing_cast(self) -> (FixedI32<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU64> OverflowingCast<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> OverflowingCast<FixedI64<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedI64<Frac>, bool)
fn overflowing_cast(self) -> (FixedI64<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> OverflowingCast<FixedI8<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedI8<Frac>, bool)
fn overflowing_cast(self) -> (FixedI8<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU128> OverflowingCast<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> OverflowingCast<FixedU128<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedU128<Frac>, bool)
fn overflowing_cast(self) -> (FixedU128<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU16> OverflowingCast<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> OverflowingCast<FixedU16<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedU16<Frac>, bool)
fn overflowing_cast(self) -> (FixedU16<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU32> OverflowingCast<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> OverflowingCast<FixedU32<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedU32<Frac>, bool)
fn overflowing_cast(self) -> (FixedU32<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU64> OverflowingCast<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> OverflowingCast<FixedU64<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedU64<Frac>, bool)
fn overflowing_cast(self) -> (FixedU64<Frac>, bool)
Casts the value.
sourceimpl<Frac: LeEqU8> OverflowingCast<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> OverflowingCast<FixedU8<Frac>> for F128
sourcefn overflowing_cast(self) -> (FixedU8<Frac>, bool)
fn overflowing_cast(self) -> (FixedU8<Frac>, bool)
Casts the value.
sourceimpl PartialEq<F128> for F128
impl PartialEq<F128> for F128
sourceimpl<Frac: LeEqU128> PartialEq<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> PartialEq<F128> for FixedI128<Frac>
sourceimpl<Frac: LeEqU16> PartialEq<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> PartialEq<F128> for FixedI16<Frac>
sourceimpl<Frac: LeEqU32> PartialEq<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> PartialEq<F128> for FixedI32<Frac>
sourceimpl<Frac: LeEqU64> PartialEq<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> PartialEq<F128> for FixedI64<Frac>
sourceimpl<Frac: LeEqU8> PartialEq<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> PartialEq<F128> for FixedI8<Frac>
sourceimpl<Frac: LeEqU128> PartialEq<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> PartialEq<F128> for FixedU128<Frac>
sourceimpl<Frac: LeEqU16> PartialEq<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> PartialEq<F128> for FixedU16<Frac>
sourceimpl<Frac: LeEqU32> PartialEq<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> PartialEq<F128> for FixedU32<Frac>
sourceimpl<Frac: LeEqU64> PartialEq<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> PartialEq<F128> for FixedU64<Frac>
sourceimpl<Frac: LeEqU8> PartialEq<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> PartialEq<F128> for FixedU8<Frac>
sourceimpl<Frac: LeEqU128> PartialEq<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> PartialEq<FixedI128<Frac>> for F128
sourceimpl<Frac: LeEqU16> PartialEq<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> PartialEq<FixedI16<Frac>> for F128
sourceimpl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> PartialEq<FixedI32<Frac>> for F128
sourceimpl<Frac: LeEqU64> PartialEq<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> PartialEq<FixedI64<Frac>> for F128
sourceimpl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> PartialEq<FixedI8<Frac>> for F128
sourceimpl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> PartialEq<FixedU128<Frac>> for F128
sourceimpl<Frac: LeEqU16> PartialEq<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> PartialEq<FixedU16<Frac>> for F128
sourceimpl<Frac: LeEqU32> PartialEq<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> PartialEq<FixedU32<Frac>> for F128
sourceimpl<Frac: LeEqU64> PartialEq<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> PartialEq<FixedU64<Frac>> for F128
sourceimpl<Frac: LeEqU8> PartialEq<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> PartialEq<FixedU8<Frac>> for F128
sourceimpl PartialOrd<F128> for F128
impl PartialOrd<F128> for F128
sourcefn partial_cmp(&self, other: &F128) -> Option<Ordering>
fn partial_cmp(&self, other: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU128> PartialOrd<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> PartialOrd<F128> for FixedI128<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU16> PartialOrd<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> PartialOrd<F128> for FixedI16<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU32> PartialOrd<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> PartialOrd<F128> for FixedI32<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU64> PartialOrd<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> PartialOrd<F128> for FixedI64<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU8> PartialOrd<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> PartialOrd<F128> for FixedI8<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU128> PartialOrd<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> PartialOrd<F128> for FixedU128<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU16> PartialOrd<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> PartialOrd<F128> for FixedU16<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU32> PartialOrd<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> PartialOrd<F128> for FixedU32<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU64> PartialOrd<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> PartialOrd<F128> for FixedU64<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU8> PartialOrd<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> PartialOrd<F128> for FixedU8<Frac>
sourcefn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &F128) -> bool
fn lt(&self, rhs: &F128) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &F128) -> bool
fn le(&self, rhs: &F128) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU128> PartialOrd<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> PartialOrd<FixedI128<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedI128<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedI128<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedI128<Frac>) -> bool
fn lt(&self, rhs: &FixedI128<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedI128<Frac>) -> bool
fn le(&self, rhs: &FixedI128<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU16> PartialOrd<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> PartialOrd<FixedI16<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedI16<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedI16<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedI16<Frac>) -> bool
fn lt(&self, rhs: &FixedI16<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedI16<Frac>) -> bool
fn le(&self, rhs: &FixedI16<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> PartialOrd<FixedI32<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedI32<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedI32<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedI32<Frac>) -> bool
fn lt(&self, rhs: &FixedI32<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedI32<Frac>) -> bool
fn le(&self, rhs: &FixedI32<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU64> PartialOrd<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> PartialOrd<FixedI64<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedI64<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedI64<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedI64<Frac>) -> bool
fn lt(&self, rhs: &FixedI64<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedI64<Frac>) -> bool
fn le(&self, rhs: &FixedI64<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> PartialOrd<FixedI8<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedI8<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedI8<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedI8<Frac>) -> bool
fn lt(&self, rhs: &FixedI8<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedI8<Frac>) -> bool
fn le(&self, rhs: &FixedI8<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> PartialOrd<FixedU128<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedU128<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedU128<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedU128<Frac>) -> bool
fn lt(&self, rhs: &FixedU128<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedU128<Frac>) -> bool
fn le(&self, rhs: &FixedU128<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU16> PartialOrd<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> PartialOrd<FixedU16<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedU16<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedU16<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedU16<Frac>) -> bool
fn lt(&self, rhs: &FixedU16<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedU16<Frac>) -> bool
fn le(&self, rhs: &FixedU16<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU32> PartialOrd<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> PartialOrd<FixedU32<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedU32<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedU32<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedU32<Frac>) -> bool
fn lt(&self, rhs: &FixedU32<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedU32<Frac>) -> bool
fn le(&self, rhs: &FixedU32<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU64> PartialOrd<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> PartialOrd<FixedU64<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedU64<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedU64<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedU64<Frac>) -> bool
fn lt(&self, rhs: &FixedU64<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedU64<Frac>) -> bool
fn le(&self, rhs: &FixedU64<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU8> PartialOrd<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> PartialOrd<FixedU8<Frac>> for F128
sourcefn partial_cmp(&self, rhs: &FixedU8<Frac>) -> Option<Ordering>
fn partial_cmp(&self, rhs: &FixedU8<Frac>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, rhs: &FixedU8<Frac>) -> bool
fn lt(&self, rhs: &FixedU8<Frac>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, rhs: &FixedU8<Frac>) -> bool
fn le(&self, rhs: &FixedU8<Frac>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<Frac: LeEqU128> SaturatingCast<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> SaturatingCast<F128> for FixedI128<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU16> SaturatingCast<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> SaturatingCast<F128> for FixedI16<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU32> SaturatingCast<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> SaturatingCast<F128> for FixedI32<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU64> SaturatingCast<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> SaturatingCast<F128> for FixedI64<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU8> SaturatingCast<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> SaturatingCast<F128> for FixedI8<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU128> SaturatingCast<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> SaturatingCast<F128> for FixedU128<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU16> SaturatingCast<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> SaturatingCast<F128> for FixedU16<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU32> SaturatingCast<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> SaturatingCast<F128> for FixedU32<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU64> SaturatingCast<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> SaturatingCast<F128> for FixedU64<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU8> SaturatingCast<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> SaturatingCast<F128> for FixedU8<Frac>
sourcefn saturating_cast(self) -> F128
fn saturating_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU128> SaturatingCast<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> SaturatingCast<FixedI128<Frac>> for F128
sourcefn saturating_cast(self) -> FixedI128<Frac>
fn saturating_cast(self) -> FixedI128<Frac>
Casts the value.
sourceimpl<Frac: LeEqU16> SaturatingCast<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> SaturatingCast<FixedI16<Frac>> for F128
sourcefn saturating_cast(self) -> FixedI16<Frac>
fn saturating_cast(self) -> FixedI16<Frac>
Casts the value.
sourceimpl<Frac: LeEqU32> SaturatingCast<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> SaturatingCast<FixedI32<Frac>> for F128
sourcefn saturating_cast(self) -> FixedI32<Frac>
fn saturating_cast(self) -> FixedI32<Frac>
Casts the value.
sourceimpl<Frac: LeEqU64> SaturatingCast<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> SaturatingCast<FixedI64<Frac>> for F128
sourcefn saturating_cast(self) -> FixedI64<Frac>
fn saturating_cast(self) -> FixedI64<Frac>
Casts the value.
sourceimpl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> SaturatingCast<FixedI8<Frac>> for F128
sourcefn saturating_cast(self) -> FixedI8<Frac>
fn saturating_cast(self) -> FixedI8<Frac>
Casts the value.
sourceimpl<Frac: LeEqU128> SaturatingCast<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> SaturatingCast<FixedU128<Frac>> for F128
sourcefn saturating_cast(self) -> FixedU128<Frac>
fn saturating_cast(self) -> FixedU128<Frac>
Casts the value.
sourceimpl<Frac: LeEqU16> SaturatingCast<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> SaturatingCast<FixedU16<Frac>> for F128
sourcefn saturating_cast(self) -> FixedU16<Frac>
fn saturating_cast(self) -> FixedU16<Frac>
Casts the value.
sourceimpl<Frac: LeEqU32> SaturatingCast<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> SaturatingCast<FixedU32<Frac>> for F128
sourcefn saturating_cast(self) -> FixedU32<Frac>
fn saturating_cast(self) -> FixedU32<Frac>
Casts the value.
sourceimpl<Frac: LeEqU64> SaturatingCast<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> SaturatingCast<FixedU64<Frac>> for F128
sourcefn saturating_cast(self) -> FixedU64<Frac>
fn saturating_cast(self) -> FixedU64<Frac>
Casts the value.
sourceimpl<Frac: LeEqU8> SaturatingCast<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> SaturatingCast<FixedU8<Frac>> for F128
sourcefn saturating_cast(self) -> FixedU8<Frac>
fn saturating_cast(self) -> FixedU8<Frac>
Casts the value.
sourceimpl ToFixed for F128
impl ToFixed for F128
sourcefn to_fixed<F: Fixed>(self) -> F
fn to_fixed<F: Fixed>(self) -> F
Converts a floating-point number to a fixed-point number.
Rounding is to the nearest, with ties rounded to even.
Panics
Panics if self
is not finite.
When debug assertions are enabled, also panics if the value does not
fit. When debug assertions are not enabled, the wrapped value can be
returned, but it is not considered a breaking change if in the future
it panics; if wrapping is required use wrapping_to_fixed
instead.
sourcefn checked_to_fixed<F: Fixed>(self) -> Option<F>
fn checked_to_fixed<F: Fixed>(self) -> Option<F>
Converts a floating-point number to a fixed-point
number if it fits, otherwise returns None
.
Rounding is to the nearest, with ties rounded to even.
sourcefn saturating_to_fixed<F: Fixed>(self) -> F
fn saturating_to_fixed<F: Fixed>(self) -> F
sourcefn wrapping_to_fixed<F: Fixed>(self) -> F
fn wrapping_to_fixed<F: Fixed>(self) -> F
sourcefn overflowing_to_fixed<F: Fixed>(self) -> (F, bool)
fn overflowing_to_fixed<F: Fixed>(self) -> (F, bool)
sourcefn unwrapped_to_fixed<F: Fixed>(self) -> F
fn unwrapped_to_fixed<F: Fixed>(self) -> F
sourceimpl<Frac: LeEqU128> UnwrappedCast<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> UnwrappedCast<F128> for FixedI128<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU16> UnwrappedCast<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> UnwrappedCast<F128> for FixedI16<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU32> UnwrappedCast<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> UnwrappedCast<F128> for FixedI32<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU64> UnwrappedCast<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> UnwrappedCast<F128> for FixedI64<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU8> UnwrappedCast<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> UnwrappedCast<F128> for FixedI8<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU128> UnwrappedCast<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> UnwrappedCast<F128> for FixedU128<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU16> UnwrappedCast<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> UnwrappedCast<F128> for FixedU16<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU32> UnwrappedCast<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> UnwrappedCast<F128> for FixedU32<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU64> UnwrappedCast<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> UnwrappedCast<F128> for FixedU64<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU8> UnwrappedCast<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> UnwrappedCast<F128> for FixedU8<Frac>
sourcefn unwrapped_cast(self) -> F128
fn unwrapped_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU128> UnwrappedCast<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> UnwrappedCast<FixedI128<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedI128<Frac>
fn unwrapped_cast(self) -> FixedI128<Frac>
Casts the value.
sourceimpl<Frac: LeEqU16> UnwrappedCast<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> UnwrappedCast<FixedI16<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedI16<Frac>
fn unwrapped_cast(self) -> FixedI16<Frac>
Casts the value.
sourceimpl<Frac: LeEqU32> UnwrappedCast<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> UnwrappedCast<FixedI32<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedI32<Frac>
fn unwrapped_cast(self) -> FixedI32<Frac>
Casts the value.
sourceimpl<Frac: LeEqU64> UnwrappedCast<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> UnwrappedCast<FixedI64<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedI64<Frac>
fn unwrapped_cast(self) -> FixedI64<Frac>
Casts the value.
sourceimpl<Frac: LeEqU8> UnwrappedCast<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> UnwrappedCast<FixedI8<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedI8<Frac>
fn unwrapped_cast(self) -> FixedI8<Frac>
Casts the value.
sourceimpl<Frac: LeEqU128> UnwrappedCast<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> UnwrappedCast<FixedU128<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedU128<Frac>
fn unwrapped_cast(self) -> FixedU128<Frac>
Casts the value.
sourceimpl<Frac: LeEqU16> UnwrappedCast<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> UnwrappedCast<FixedU16<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedU16<Frac>
fn unwrapped_cast(self) -> FixedU16<Frac>
Casts the value.
sourceimpl<Frac: LeEqU32> UnwrappedCast<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> UnwrappedCast<FixedU32<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedU32<Frac>
fn unwrapped_cast(self) -> FixedU32<Frac>
Casts the value.
sourceimpl<Frac: LeEqU64> UnwrappedCast<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> UnwrappedCast<FixedU64<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedU64<Frac>
fn unwrapped_cast(self) -> FixedU64<Frac>
Casts the value.
sourceimpl<Frac: LeEqU8> UnwrappedCast<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> UnwrappedCast<FixedU8<Frac>> for F128
sourcefn unwrapped_cast(self) -> FixedU8<Frac>
fn unwrapped_cast(self) -> FixedU8<Frac>
Casts the value.
sourceimpl<Frac: LeEqU128> WrappingCast<F128> for FixedI128<Frac>
impl<Frac: LeEqU128> WrappingCast<F128> for FixedI128<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU16> WrappingCast<F128> for FixedI16<Frac>
impl<Frac: LeEqU16> WrappingCast<F128> for FixedI16<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU32> WrappingCast<F128> for FixedI32<Frac>
impl<Frac: LeEqU32> WrappingCast<F128> for FixedI32<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU64> WrappingCast<F128> for FixedI64<Frac>
impl<Frac: LeEqU64> WrappingCast<F128> for FixedI64<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU8> WrappingCast<F128> for FixedI8<Frac>
impl<Frac: LeEqU8> WrappingCast<F128> for FixedI8<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU128> WrappingCast<F128> for FixedU128<Frac>
impl<Frac: LeEqU128> WrappingCast<F128> for FixedU128<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU16> WrappingCast<F128> for FixedU16<Frac>
impl<Frac: LeEqU16> WrappingCast<F128> for FixedU16<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU32> WrappingCast<F128> for FixedU32<Frac>
impl<Frac: LeEqU32> WrappingCast<F128> for FixedU32<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU64> WrappingCast<F128> for FixedU64<Frac>
impl<Frac: LeEqU64> WrappingCast<F128> for FixedU64<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU8> WrappingCast<F128> for FixedU8<Frac>
impl<Frac: LeEqU8> WrappingCast<F128> for FixedU8<Frac>
sourcefn wrapping_cast(self) -> F128
fn wrapping_cast(self) -> F128
Casts the value.
sourceimpl<Frac: LeEqU128> WrappingCast<FixedI128<Frac>> for F128
impl<Frac: LeEqU128> WrappingCast<FixedI128<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedI128<Frac>
fn wrapping_cast(self) -> FixedI128<Frac>
Casts the value.
sourceimpl<Frac: LeEqU16> WrappingCast<FixedI16<Frac>> for F128
impl<Frac: LeEqU16> WrappingCast<FixedI16<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedI16<Frac>
fn wrapping_cast(self) -> FixedI16<Frac>
Casts the value.
sourceimpl<Frac: LeEqU32> WrappingCast<FixedI32<Frac>> for F128
impl<Frac: LeEqU32> WrappingCast<FixedI32<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedI32<Frac>
fn wrapping_cast(self) -> FixedI32<Frac>
Casts the value.
sourceimpl<Frac: LeEqU64> WrappingCast<FixedI64<Frac>> for F128
impl<Frac: LeEqU64> WrappingCast<FixedI64<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedI64<Frac>
fn wrapping_cast(self) -> FixedI64<Frac>
Casts the value.
sourceimpl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for F128
impl<Frac: LeEqU8> WrappingCast<FixedI8<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedI8<Frac>
fn wrapping_cast(self) -> FixedI8<Frac>
Casts the value.
sourceimpl<Frac: LeEqU128> WrappingCast<FixedU128<Frac>> for F128
impl<Frac: LeEqU128> WrappingCast<FixedU128<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedU128<Frac>
fn wrapping_cast(self) -> FixedU128<Frac>
Casts the value.
sourceimpl<Frac: LeEqU16> WrappingCast<FixedU16<Frac>> for F128
impl<Frac: LeEqU16> WrappingCast<FixedU16<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedU16<Frac>
fn wrapping_cast(self) -> FixedU16<Frac>
Casts the value.
sourceimpl<Frac: LeEqU32> WrappingCast<FixedU32<Frac>> for F128
impl<Frac: LeEqU32> WrappingCast<FixedU32<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedU32<Frac>
fn wrapping_cast(self) -> FixedU32<Frac>
Casts the value.
sourceimpl<Frac: LeEqU64> WrappingCast<FixedU64<Frac>> for F128
impl<Frac: LeEqU64> WrappingCast<FixedU64<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedU64<Frac>
fn wrapping_cast(self) -> FixedU64<Frac>
Casts the value.
sourceimpl<Frac: LeEqU8> WrappingCast<FixedU8<Frac>> for F128
impl<Frac: LeEqU8> WrappingCast<FixedU8<Frac>> for F128
sourcefn wrapping_cast(self) -> FixedU8<Frac>
fn wrapping_cast(self) -> FixedU8<Frac>
Casts the value.
impl Copy for F128
Auto Trait Implementations
impl RefUnwindSafe for F128
impl Send for F128
impl Sync for F128
impl Unpin for F128
impl UnwindSafe for F128
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
sourcefn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
sourceimpl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
sourcefn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.