Struct fixed::F128

source ·
pub struct F128 { /* private fields */ }
Expand description

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.

This type does not support arithmetic or general analytic functions.

Please see Quadruple-precision floating-point format on Wikipedia for more information on binary128.

See also the fixed::f128::consts module.

Examples

#![feature(generic_const_exprs)]

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§

source§

impl F128

source

pub const ZERO: F128 = _

Zero.

source

pub const NEG_ZERO: F128 = _

Negative zero (−0).

source

pub const ONE: F128 = _

One.

source

pub const NEG_ONE: F128 = _

Negative one (−1).

source

pub const MIN_POSITIVE_SUB: F128 = _

Smallest positive subnormal number.

Equal to 2MIN_EXP − MANTISSA_DIGITS.

source

pub const MIN_POSITIVE: F128 = _

Smallest positive normal number.

Equal to 2MIN_EXP − 1.

source

pub const MAX: F128 = _

Largest finite number.

Equal to (1 − 2MANTISSA_DIGITS) 2MAX_EXP.

source

pub const MIN: F128 = _

Smallest finite number (−MAX).

source

pub const INFINITY: F128 = _

Infinity (∞).

source

pub const NEG_INFINITY: F128 = _

Negative infinity (−∞).

source

pub const NAN: F128 = _

NaN.

source

pub const RADIX: u32 = 2u32

The radix or base of the internal representation (2).

source

pub const MANTISSA_DIGITS: u32 = 113u32

Number of significant digits in base 2.

source

pub const DIGITS: u32 = 33u32

Maximum x such that any decimal number with x significant digits can be converted to F128 and back without loss.

Equal to floor(log10 2MANTISSA_DIGITS − 1).

source

pub const EPSILON: F128 = _

The difference between 1 and the next larger representable number.

Equal to 21 − MANTISSA_DIGITS.

source

pub const MIN_EXP: i32 = -16_381i32

If x = MIN_EXP, then normal numbers ≥ 0.5 × 2x.

source

pub const MAX_EXP: i32 = 16_384i32

If x = MAX_EXP, then normal numbers < 1 × 2x.

source

pub const MIN_10_EXP: i32 = -4_931i32

Minimum x for which 10x is in the normal range of F128.

Equal to ceil(log10 MIN_POSITIVE).

source

pub const MAX_10_EXP: i32 = 4_932i32

Maximum x for which 10x is in the normal range of F128.

Equal to floor(log10 MAX).

source

pub const fn from_bits(bits: u128) -> F128

Raw transmutation from u128.

Examples
use fixed::F128;
let infinity_bits = 0x7FFF_u128 << 112;
assert!(F128::from_bits(infinity_bits - 1).is_finite());
assert!(!F128::from_bits(infinity_bits).is_finite());
source

pub const fn to_bits(self) -> u128

Raw transmutation to u128.

Examples
use fixed::F128;
assert_eq!(F128::ONE.to_bits(), 0x3FFF_u128 << 112);
assert_ne!(F128::ONE.to_bits(), 1u128);
source

pub const fn from_be_bytes(bytes: [u8; 16]) -> F128

Creates a number from a byte array in big-endian byte order.

source

pub const fn from_le_bytes(bytes: [u8; 16]) -> F128

Creates a number from a byte array in little-endian byte order.

source

pub const fn from_ne_bytes(bytes: [u8; 16]) -> F128

Creates a number from a byte array in native-endian byte order.

source

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.

source

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.

source

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.

source

pub const fn is_nan(self) -> bool

Returns true if the number is NaN.

Example
use fixed::F128;

assert!(F128::NAN.is_nan());

assert!(!F128::ONE.is_nan());
assert!(!F128::INFINITY.is_nan());
assert!(!F128::NEG_INFINITY.is_nan());
source

pub const fn is_infinite(self) -> bool

Returns true if the number is infinite.

Example
use fixed::F128;

assert!(F128::INFINITY.is_infinite());
assert!(F128::NEG_INFINITY.is_infinite());

assert!(!F128::ONE.is_infinite());
assert!(!F128::NAN.is_infinite());
source

pub const fn is_finite(self) -> bool

Returns true if the number is neither infinite nor NaN.

Example
use fixed::F128;

assert!(F128::ONE.is_finite());
assert!(F128::MAX.is_finite());

assert!(!F128::INFINITY.is_finite());
assert!(!F128::NEG_INFINITY.is_finite());
assert!(!F128::NAN.is_finite());
source

pub const fn is_zero(self) -> bool

Returns true if the number is zero.

Example
use fixed::F128;

assert!(F128::ZERO.is_zero());
assert!(F128::NEG_ZERO.is_zero());

assert!(!F128::MIN_POSITIVE_SUB.is_zero());
assert!(!F128::NAN.is_zero());
source

pub const fn is_subnormal(self) -> bool

Returns true if the number is subnormal.

Example
use fixed::F128;

assert!(F128::MIN_POSITIVE_SUB.is_subnormal());

assert!(!F128::ZERO.is_subnormal());
assert!(!F128::MIN_POSITIVE.is_subnormal());
source

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());
source

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);
source

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());
source

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());
source

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());
source

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());
source

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());
source

pub const fn max(self, other: F128) -> F128

Returns the maximum of two numbers, ignoring NaN.

If one of the arguments is NaN, then the other argument is returned.

Example
use fixed::F128;

assert_eq!(F128::ZERO.max(F128::ONE), F128::ONE);
source

pub const fn min(self, other: F128) -> F128

Returns the minimum of two numbers, ignoring NaN.

If one of the arguments is NaN, then the other argument is returned.

Example
use fixed::F128;

assert_eq!(F128::ZERO.min(F128::ONE), F128::ZERO);
source

pub const fn clamp(self, min: F128, max: F128) -> F128

Clamps the value within the specified bounds.

Returns min if self < min, max if self > max, or self otherwise.

Note that this method returns NaN if the initial value is NaN.

Panics

Panics if min > max, min is NaN, or max is NaN.

Examples
use fixed::F128;
assert_eq!(F128::MIN.clamp(F128::NEG_ONE, F128::ONE), F128::NEG_ONE);
assert_eq!(F128::ZERO.clamp(F128::NEG_ONE, F128::ONE), F128::ZERO);
assert_eq!(F128::MAX.clamp(F128::NEG_ONE, F128::ONE), F128::ONE);
assert!(F128::NAN.clamp(F128::NEG_ONE, F128::ONE).is_nan());
source

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§

source§

impl<const FRAC: i32> Cast<F128> for FixedI128<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedI16<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedI32<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedI64<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedI8<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedU128<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedU16<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedU32<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedU64<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<F128> for FixedU8<FRAC>

source§

fn cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedI128<FRAC>> for F128

source§

fn cast(self) -> FixedI128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedI16<FRAC>> for F128

source§

fn cast(self) -> FixedI16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedI32<FRAC>> for F128

source§

fn cast(self) -> FixedI32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedI64<FRAC>> for F128

source§

fn cast(self) -> FixedI64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedI8<FRAC>> for F128

source§

fn cast(self) -> FixedI8<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedU128<FRAC>> for F128

source§

fn cast(self) -> FixedU128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedU16<FRAC>> for F128

source§

fn cast(self) -> FixedU16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedU32<FRAC>> for F128

source§

fn cast(self) -> FixedU32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedU64<FRAC>> for F128

source§

fn cast(self) -> FixedU64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> Cast<FixedU8<FRAC>> for F128

source§

fn cast(self) -> FixedU8<FRAC>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedI128<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedI16<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedI32<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedI64<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedI8<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedU128<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedU16<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedU32<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedU64<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<F128> for FixedU8<FRAC>

source§

fn checked_cast(self) -> Option<F128>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedI128<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedI128<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedI16<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedI16<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedI32<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedI32<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedI64<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedI64<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedI8<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedI8<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedU128<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedU128<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedU16<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedU16<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedU32<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedU32<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedU64<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedU64<FRAC>>

Casts the value.
source§

impl<const FRAC: i32> CheckedCast<FixedU8<FRAC>> for F128

source§

fn checked_cast(self) -> Option<FixedU8<FRAC>>

Casts the value.
source§

impl Clone for F128

source§

fn clone(&self) -> F128

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for F128

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for F128

source§

fn default() -> F128

Returns the “default value” for a type. Read more
source§

impl<const FRAC: i32> From<FixedI16<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedI16<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedI32<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedI32<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedI64<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedI64<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedI8<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedI8<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedU16<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedU16<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedU32<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedU32<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedU64<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedU64<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl<const FRAC: i32> From<FixedU8<FRAC>> for F128where If<{ _ }>: True,

source§

fn from(src: FixedU8<FRAC>) -> Self

Converts a fixed-point number to a floating-point number.

This conversion never fails (infallible) and does not lose any precision (lossless).

source§

impl From<bf16> for F128

source§

fn from(src: bf16) -> F128

Converts to this type from the input type.
source§

impl From<f16> for F128

source§

fn from(src: f16) -> F128

Converts to this type from the input type.
source§

impl From<f32> for F128

source§

fn from(src: f32) -> F128

Converts to this type from the input type.
source§

impl From<f64> for F128

source§

fn from(src: f64) -> F128

Converts to this type from the input type.
source§

impl FromFixed for F128

source§

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.

source§

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.

source§

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.

source§

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.

source§

fn overflowing_from_fixed<F: Fixed>(src: F) -> (Self, bool)

Converts a fixed-point number to a floating-point number.

Returns a tuple of the value and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned.

Rounding is to the nearest, with ties rounded to even.

source§

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.

source§

impl Hash for F128

source§

fn hash<H>(&self, state: &mut H)where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<const FRAC: i32> LosslessTryFrom<FixedI16<FRAC>> for F128

source§

fn lossless_try_from(src: FixedI16<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedI32<FRAC>> for F128

source§

fn lossless_try_from(src: FixedI32<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedI64<FRAC>> for F128

source§

fn lossless_try_from(src: FixedI64<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedI8<FRAC>> for F128

source§

fn lossless_try_from(src: FixedI8<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedU16<FRAC>> for F128

source§

fn lossless_try_from(src: FixedU16<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedU32<FRAC>> for F128

source§

fn lossless_try_from(src: FixedU32<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedU64<FRAC>> for F128

source§

fn lossless_try_from(src: FixedU64<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl<const FRAC: i32> LosslessTryFrom<FixedU8<FRAC>> for F128

source§

fn lossless_try_from(src: FixedU8<FRAC>) -> Option<Self>

Converts a fixed-point number to a floating-point number.

This conversion may fail (fallible) but cannot lose precision (lossless). As a consequency, ∞ are −∞ are never returned, as they would lose precision.

source§

impl LosslessTryFrom<i16> for F128

source§

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).

source§

impl LosslessTryFrom<i32> for F128

source§

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).

source§

impl LosslessTryFrom<i64> for F128

source§

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).

source§

impl LosslessTryFrom<i8> for F128

source§

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).

source§

impl LosslessTryFrom<u16> for F128

source§

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).

source§

impl LosslessTryFrom<u32> for F128

source§

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).

source§

impl LosslessTryFrom<u64> for F128

source§

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).

source§

impl LosslessTryFrom<u8> for F128

source§

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).

source§

impl<const FRAC: i32> LossyFrom<FixedI128<FRAC>> for F128

source§

fn lossy_from(src: FixedI128<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedI16<FRAC>> for F128

source§

fn lossy_from(src: FixedI16<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedI32<FRAC>> for F128

source§

fn lossy_from(src: FixedI32<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedI64<FRAC>> for F128

source§

fn lossy_from(src: FixedI64<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedI8<FRAC>> for F128

source§

fn lossy_from(src: FixedI8<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedU128<FRAC>> for F128

source§

fn lossy_from(src: FixedU128<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedU16<FRAC>> for F128

source§

fn lossy_from(src: FixedU16<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedU32<FRAC>> for F128

source§

fn lossy_from(src: FixedU32<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedU64<FRAC>> for F128

source§

fn lossy_from(src: FixedU64<FRAC>) -> Self

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.

source§

impl<const FRAC: i32> LossyFrom<FixedU8<FRAC>> for F128

source§

fn lossy_from(src: FixedU8<FRAC>) -> Self

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.

source§

impl LossyFrom<i128> for F128

source§

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.

source§

impl LossyFrom<i16> for F128

source§

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).

source§

impl LossyFrom<i32> for F128

source§

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).

source§

impl LossyFrom<i64> for F128

source§

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).

source§

impl LossyFrom<i8> for F128

source§

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).

source§

impl LossyFrom<isize> for F128

source§

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.

source§

impl LossyFrom<u128> for F128

source§

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.

source§

impl LossyFrom<u16> for F128

source§

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).

source§

impl LossyFrom<u32> for F128

source§

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).

source§

impl LossyFrom<u64> for F128

source§

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).

source§

impl LossyFrom<u8> for F128

source§

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).

source§

impl LossyFrom<usize> for F128

source§

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.

source§

impl Neg for F128

§

type Output = F128

The resulting type after applying the - operator.
source§

fn neg(self) -> F128

Performs the unary - operation. Read more
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedI128<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedI16<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedI32<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedI64<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedI8<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedU128<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedU16<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedU32<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedU64<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<F128> for FixedU8<FRAC>

source§

fn overflowing_cast(self) -> (F128, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedI128<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedI128<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedI16<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedI16<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedI32<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedI32<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedI64<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedI64<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedI8<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedI8<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedU128<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedU128<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedU16<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedU16<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedU32<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedU32<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedU64<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedU64<FRAC>, bool)

Casts the value.
source§

impl<const FRAC: i32> OverflowingCast<FixedU8<FRAC>> for F128

source§

fn overflowing_cast(self) -> (FixedU8<FRAC>, bool)

Casts the value.
source§

impl PartialEq<F128> for F128

source§

fn eq(&self, other: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedI128<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedI16<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedI32<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedI64<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedI8<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedU128<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedU16<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedU32<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedU64<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<F128> for FixedU8<FRAC>

source§

fn eq(&self, rhs: &F128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedI128<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedI128<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedI16<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedI16<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedI32<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedI32<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedI64<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedI64<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedI8<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedI8<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedU128<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedU128<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedU16<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedU16<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedU32<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedU32<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedU64<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedU64<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const FRAC: i32> PartialEq<FixedU8<FRAC>> for F128

source§

fn eq(&self, rhs: &FixedU8<FRAC>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<F128> for F128

source§

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 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedI128<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedI16<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedI32<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedI64<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedI8<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedU128<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedU16<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedU32<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedU64<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<F128> for FixedU8<FRAC>

source§

fn partial_cmp(&self, rhs: &F128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedI128<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedI128<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedI16<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedI16<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedI32<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedI32<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedI64<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedI64<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedI8<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedI8<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedU128<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedU128<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedU16<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedU16<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedU32<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedU32<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedU64<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedU64<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> PartialOrd<FixedU8<FRAC>> for F128

source§

fn partial_cmp(&self, rhs: &FixedU8<FRAC>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedI128<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedI16<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedI32<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedI64<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedI8<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedU128<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedU16<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedU32<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedU64<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<F128> for FixedU8<FRAC>

source§

fn saturating_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedI128<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedI128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedI16<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedI16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedI32<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedI32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedI64<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedI64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedI8<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedI8<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedU128<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedU128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedU16<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedU16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedU32<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedU32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedU64<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedU64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> SaturatingCast<FixedU8<FRAC>> for F128

source§

fn saturating_cast(self) -> FixedU8<FRAC>

Casts the value.
source§

impl ToFixed for F128

source§

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.

source§

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.

source§

fn saturating_to_fixed<F: Fixed>(self) -> F

Converts a floating-point number to a fixed-point number, saturating if it does not fit.

Rounding is to the nearest, with ties rounded to even.

Panics

Panics if self is NaN.

source§

fn wrapping_to_fixed<F: Fixed>(self) -> F

Converts a floating-point number to a fixed-point number, wrapping if it does not fit.

Rounding is to the nearest, with ties rounded to even.

Panics

Panics if self is not finite.

source§

fn overflowing_to_fixed<F: Fixed>(self) -> (F, bool)

Converts a floating-point number to a fixed-point number.

Returns a tuple of the fixed-point number and a bool indicating whether an overflow has occurred. On overflow, the wrapped value is returned.

Rounding is to the nearest, with ties rounded to even.

Panics

Panics if self is not finite.

source§

fn unwrapped_to_fixed<F: Fixed>(self) -> F

Converts a floating-point number to a fixed-point number, panicking if it does not fit.

Rounding is to the nearest, with ties rounded to even.

Panics

Panics if self is not finite or if the value does not fit, even when debug assertions are not enabled.

source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedI128<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedI16<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedI32<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedI64<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedI8<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedU128<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedU16<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedU32<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedU64<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<F128> for FixedU8<FRAC>

source§

fn unwrapped_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedI128<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedI128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedI16<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedI16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedI32<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedI32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedI64<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedI64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedI8<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedI8<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedU128<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedU128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedU16<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedU16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedU32<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedU32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedU64<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedU64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> UnwrappedCast<FixedU8<FRAC>> for F128

source§

fn unwrapped_cast(self) -> FixedU8<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedI128<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedI16<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedI32<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedI64<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedI8<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedU128<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedU16<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedU32<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedU64<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<F128> for FixedU8<FRAC>

source§

fn wrapping_cast(self) -> F128

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedI128<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedI128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedI16<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedI16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedI32<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedI32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedI64<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedI64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedI8<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedI8<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedU128<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedU128<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedU16<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedU16<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedU32<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedU32<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedU64<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedU64<FRAC>

Casts the value.
source§

impl<const FRAC: i32> WrappingCast<FixedU8<FRAC>> for F128

source§

fn wrapping_cast(self) -> FixedU8<FRAC>

Casts the value.
source§

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dstwhere T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dstwhere Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,

source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
source§

impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,

source§

fn lossy_into(self) -> Dst

Performs the conversion.
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.