logos.lang.num.float
Module lang · package logos-lang
Types
enumFpCategory
enum FpCategory
Classification of an IEEE 754 floating-point number; mirrors core::num::FpCategory.
Variants in IEEE-754-classification order: Nan / Infinite / Zero / Subnormal / Normal.
Variants
Infinite
Nan
Normal
Subnormal
Zero
Functions
fnf32_classify
fn f32_classify(x: f32) -> FpCategory
Returns the FpCategory of x by IEEE 754 exponent/mantissa inspection (f32::classify).
fnf32_from_bits
fn f32_from_bits(b: u32) -> f32
Reinterprets the IEEE 754 bit pattern b as an f32 (same as f32::from_bits).
Any bit pattern is accepted, including ones that decode to NaN or infinity.
fnf32_is_finite
fn f32_is_finite(x: f32) -> bool
Returns true if x is neither infinite nor NaN.
fnf32_is_infinite
fn f32_is_infinite(x: f32) -> bool
Returns true if x is positive or negative infinity (false for NaN).
fnf32_is_nan
fn f32_is_nan(x: f32) -> bool
Returns true if x is NaN.
fnf32_is_normal
fn f32_is_normal(x: f32) -> bool
Returns true if x is normal: not zero, subnormal, infinite, or NaN.
fnf32_to_bits
fn f32_to_bits(x: f32) -> u32
Returns the raw IEEE 754 bit pattern of x as a u32 (same as f32::to_bits).
fnf64_classify
fn f64_classify(x: f64) -> FpCategory
Returns the FpCategory of x by IEEE 754 exponent/mantissa inspection (f64::classify).
fnf64_from_bits
fn f64_from_bits(b: u64) -> f64
Reinterprets the IEEE 754 bit pattern b as an f64 (same as f64::from_bits).
Any bit pattern is accepted, including ones that decode to NaN or infinity.
fnf64_is_finite
fn f64_is_finite(x: f64) -> bool
Returns true if x is neither infinite nor NaN.
fnf64_is_infinite
fn f64_is_infinite(x: f64) -> bool
Returns true if x is positive or negative infinity (false for NaN).
fnf64_is_nan
fn f64_is_nan(x: f64) -> bool
Returns true if x is NaN.
fnf64_is_normal
fn f64_is_normal(x: f64) -> bool
Returns true if x is normal: not zero, subnormal, infinite, or NaN.
fnf64_to_bits
fn f64_to_bits(x: f64) -> u64
Returns the raw IEEE 754 bit pattern of x as a u64 (same as f64::to_bits).