Expand description
Float atoms outside the big verbatim-upstream Float/FloatCore
bundles: bit-pattern access, ULP stepping, IEEE 754-2019 min/max,
round-half-to-even, the algebraic_* fast-math family and the
libm-backed special functions.
This is the first slice of the planned Float decomposition:
everything here that touches only bits and comparisons is a
c0nst trait with const impls on nightly — unlike the transcendental
bundle, which waits on std/libm.
CT tiers: FloatBits, NextUp/NextDown and Algebraic
are Tier A; Minimum/Maximum are Tier B-ish (comparison ladders,
but on floats CT rarely applies); RoundTiesEven, Erf and
Gamma are Tier C (data-dependent branching / libm).
Traits§
- Algebraic
- Arithmetic with an “algebraic” license: the compiler may reassociate, use reciprocal shortcuts, or contract into fused operations.
- Erf
- The error function and its complement.
- Float
Bits - Raw IEEE 754 bit-pattern access.
- Gamma
- The gamma function and the natural log of its absolute value.
- Maximum
- IEEE 754-2019
maximum(NaN-propagating, unlikemax). - Minimum
- IEEE 754-2019
minimum(NaN-propagating, unlikemin). - Next
Down - Steps one ULP towards negative infinity.
- NextUp
- Steps one ULP towards positive infinity.
- Round
Ties Even - Rounds half-way cases to the nearest even integer (banker’s rounding).