Expand description
NotNan is a floating point type, suitable for use in ranges. Every value except NaN is
valid, including +infinity and -infinity.
Ordering and other semantics are as per normal floating point comparisons.
The NotNanF32/NotNanF64 wrappers are available by default. Enable
float_nightly_experimental on nightly to add NotNanF16/NotNanF128.
Structs§
Traits§
- NotNan
Range Ext - Extension trait for converting an inclusive
NotNanrange into an inclusive primitive range (or a(start, end)primitive tuple). - NotNan
Slice Ext - Extension trait for viewing a slice of
NotNanvalues as primitive values.
Functions§
- nnf16
float_nightly_experimental - Construct a
NotNanF16from anf16. Shorthand forNotNanF16::new - nnf32
- Construct a
NotNanF32from anf32. Shorthand forNotNanF32::new - nnf64
- Construct a
NotNanF64from anf64. Shorthand forNotNanF64::new - nnf128
float_nightly_experimental - Construct a
NotNanF128from anf128. Shorthand forNotNanF128::new
Type Aliases§
- NotNan
F16 float_nightly_experimental - Total ordered f16, with
-0.0normalized to+0.0, and excluding NaN. - NotNan
F32 - Total ordered f32, with
-0.0normalized to+0.0, and excluding NaN. - NotNan
F64 - Total ordered f64, with
-0.0normalized to+0.0, and excluding NaN. - NotNan
F128 float_nightly_experimental - Total ordered f128, with
-0.0normalized to+0.0, and excluding NaN.