Module imp
Numeric routines, separate from API.
Modules
- bignum Custom arbitrary-precision number (bignum) implementation.
- dec2flt Converting decimal strings into IEEE 754 binary floating point numbers.
- diy_float Extended precision "soft float", for internal use only.
- flt2dec Floating-point number to decimal conversion routines.
- fmt Shared utilities used by both float and integer formatting.
-
int_bits
Implementations for
uN::extract_bitsanduN::deposit_bits - int_log10 These functions compute the integer logarithm of their type, assuming that someone has already checked that the value is strictly positive.
- int_sqrt These functions use the [Karatsuba square root algorithm][1] to compute the integer square root for the primitive integer types.
-
libm
Bindings to math functions provided by the system
libmor by thelibmcrate, exposed viacompiler-builtins. - overflow_panic Functions for panicking on overflow.
- traits Numeric traits used for internal implementations.
Traits
- Float A helper trait to avoid duplicating basically all the conversion code for IEEE floats.
-
FloatExt
Items that ideally would be on
Float, but don't apply to all float types because they rely on the mantissa fitting into au64(which isn't true forf128). - Int Collection of traits that allow us to be generic over integer size.