doc.rust-lang.org
pub const fn to_bits(self) -> u64
Raw transmutation to u64.
method
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_be_bytes(self) -> [u8; 8]
Returns the memory representation of this floating point number as a byte array in big-endian (network) byte order.
method
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn signum(self) -> f64
Returns a number that represents the sign of self.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn recip(self) -> f64
Takes the reciprocal (inverse) of a number, 1/x.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn next_up(self) -> Self
Returns the least number greater than self.
method
core
Stable since 1.86.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn next_down(self) -> Self
Returns the greatest number less than self.
method
core
Stable since 1.86.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min(self, other: f64) -> f64
Returns the minimum of the two numbers, ignoring NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn midpoint(self, other: f64) -> f64
Calculates the midpoint (average) between self and rhs.
method
core
Stable since 1.85.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max(self, other: f64) -> f64
Returns the maximum of the two numbers, ignoring NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_subnormal(self) -> bool
Returns true if the number is subnormal.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_sign_positive(self) -> bool
Returns true if self has a positive sign, including +0.0, NaNs with positive sign bit and positive infinity.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_sign_negative(self) -> bool
Returns true if self has a negative sign, including -0.0, NaNs with negative sign bit and negative infinity.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_normal(self) -> bool
Returns true if the number is neither zero, infinite, subnormal, or NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_nan(self) -> bool
Returns true if this value is NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_infinite(self) -> bool
Returns true if this value is positive infinity or negative infinity, and false otherwise.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_finite(self) -> bool
Returns true if this number is neither infinite nor NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_ne_bytes(bytes: [u8; 8]) -> Self
Creates a floating point value from its representation as a byte array in native endian.
associated_function
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_le_bytes(bytes: [u8; 8]) -> Self
Creates a floating point value from its representation as a byte array in little endian.
associated_function
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_bits(v: u64) -> Self
Raw transmutation from u64.
associated_function
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_be_bytes(bytes: [u8; 8]) -> Self
Creates a floating point value from its representation as a byte array in big endian.
associated_function
core
Stable since 1.40.0
Version 1.100.0-nightly