Skip to main content

Module finite

Module finite 

Source
Expand description

Finite is a floating point type, suitable for use in ranges. Only finite values are valid.

Ordering and other semantics are as per normal floating point comparisons.

Enable with float_experimental (stable, FiniteF32/FiniteF64) and float_nightly_experimental (nightly, adds FiniteF16/FiniteF128).

Structs§

Finite
Experimental: A transparent wrapper around f64 and friends with total ordering.

Traits§

FiniteRangeExt
Extension trait for converting an inclusive Finite range into an inclusive primitive range (or a (start, end) primitive tuple).
FiniteSliceExt
Extension trait for viewing a slice of Finite values as primitive values.

Functions§

ff32
Construct a FiniteF32 from an f32. Shorthand for FiniteF32::new
ff64
Construct a FiniteF64 from an f64. Shorthand for FiniteF64::new

Type Aliases§

FiniteF32
Total ordered f32, with -0.0 normalized to +0.0, and excluding NaN and infinities.
FiniteF64
Total ordered f64, with -0.0 normalized to +0.0, and excluding NaN and infinities.