internal API

The internal package holds the machine constants that the other packages use to choose step sizes and to bound roundoff error. It contains no functions. The constants are those of gsl_machine.h in the GNU Scientific Library.

Machine constants

Every constant is a Double named machine_<prefix><quantity>. The quantity names a limit of a floating-point format:

QuantityMeaning
dbl_epsilonThe machine epsilon of double precision, 2−52≈2.22⋅10−162^{-52} \approx 2.22 \cdot 10^{-16}.
dbl_minThe smallest positive normal double, ≈2.23⋅10−308\approx 2.23 \cdot 10^{-308}.
dbl_maxThe largest finite double, ≈1.80⋅10308\approx 1.80 \cdot 10^{308}.
flt_epsilonThe machine epsilon of single precision, 2−232^{-23}.
flt_minThe smallest positive normal single-precision value.
flt_maxThe largest finite single-precision value.
sflt_epsilonThe machine epsilon of the short float format of GSL, 2−112^{-11}.
epsThe rounded machine tolerances of GSL_MACH_EPS, which exist only with a prefix.

The prefix names a function of that quantity:

PrefixValueAvailable for
nonethe quantity itselfdbl_*, flt_*, sflt_epsilon
sqrt_its square rootall quantities
root_3_ to root_6_its third to sixth rootall quantities
log_its natural logarithmall quantities

For example, machine_sqrt_dbl_epsilon is ε≈1.49⋅10−8\sqrt{\varepsilon} \approx 1.49 \cdot 10^{-8} and machine_log_dbl_max is ln⁡(dbl_max)≈709.78\ln(\text{dbl\_max}) \approx 709.78. The rounded eps values are machine_sqrt_eps (3.2⋅10−83.2 \cdot 10^{-8}), machine_root_3_eps (10−510^{-5}), machine_root_4_eps (1.78⋅10−41.78 \cdot 10^{-4}), machine_root_5_eps (10−310^{-3}), machine_root_6_eps (3.16⋅10−33.16 \cdot 10^{-3}) and machine_log_eps (−34.54-34.54).