Expand description
Floating-point utilities beyond the standard library surface:
accurate expm1/log1p, exact summation, isclose, and the classic
frexp/ldexp/modf/nextafter decomposition functions.
expm1/log1p use hardware-accelerated std methods on standard builds
and fall back to libm under no_std (when the libm feature is on).
Functions§
- expm1
e^x - 1, accurate for smallx(no catastrophic cancellation).- frexp
- Split
xinto a mantissamin[0.5, 1)(sign preserved) and an integer exponentesuch thatx == m * 2^e. - fsum
- Exactly rounded sum of a slice (Neumaier compensated summation).
- isclose
- Approximate equality with relative and absolute tolerances.
- ldexp
- Construct
x * 2^e, correctly handling subnormals and overflow. - log1p
ln(1 + x), accurate for smallx.- modf
- Split
xinto fractional and integral parts, both withx’s sign. - nextafter
- Next representable
f64stepping fromxtowardy.