Skip to main content

Module not_nan

Module not_nan 

Source
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§

NotNan
A transparent wrapper around f64 and friends with total ordering.

Traits§

NotNanRangeExt
Extension trait for converting an inclusive NotNan range into an inclusive primitive range (or a (start, end) primitive tuple).
NotNanSliceExt
Extension trait for viewing a slice of NotNan values as primitive values.

Functions§

nnf16float_nightly_experimental
Construct a NotNanF16 from an f16. Shorthand for NotNanF16::new
nnf32
Construct a NotNanF32 from an f32. Shorthand for NotNanF32::new
nnf64
Construct a NotNanF64 from an f64. Shorthand for NotNanF64::new
nnf128float_nightly_experimental
Construct a NotNanF128 from an f128. Shorthand for NotNanF128::new

Type Aliases§

NotNanF16float_nightly_experimental
Total ordered f16, with -0.0 normalized to +0.0, and excluding NaN.
NotNanF32
Total ordered f32, with -0.0 normalized to +0.0, and excluding NaN.
NotNanF64
Total ordered f64, with -0.0 normalized to +0.0, and excluding NaN.
NotNanF128float_nightly_experimental
Total ordered f128, with -0.0 normalized to +0.0, and excluding NaN.