DoubleFloats Accuracy Report
Generated by docs/reports/accuracies.jl on Julia 1.12.6.
Each function is evaluated at random in-domain points and compared against a 512-bit BigFloat reference. Errors are reported in units of the Double64 working precision, 1 ulp = 2⁻¹⁰⁴ relative (about 4.9e-32); a worst case of ~1 ulp means the function is as accurate as the format allows. This report samples a representative subset; it does not cover all available functions.
Exponentials and Logarithms
| function | domain | samples | median (ulps) | worst (ulps) |
|---|---|---|---|---|
exp | (-100, 100) | 250 | 0.13 | 0.81 |
exp | (-660, -600) | 250 | 0.02 | 0.12 |
expm1 | (-1, 1) | 250 | 0.02 | 0.12 |
log | (0, 100) | 250 | 0.05 | 0.51 |
log | 1 ± 2⁻³¹ | 250 | 0.05 | 1.04 |
log1p | (-1, 1) | 250 | 0.10 | 1.00 |
log2 | (0, 100) | 250 | 0.06 | 0.49 |
log10 | (0, 100) | 250 | 0.66 | 0.98 |
Note: exp(x) for x below about −670 is representation-limited — the result's low word falls below the subnormal floor, so no algorithm returning a Double64 can do better; errors there are excluded from the table because they measure the format, not the function.
Trigonometric Functions
| function | domain | samples | median (ulps) | worst (ulps) |
|---|---|---|---|---|
sin | (-100, 100) | 250 | 0.02 | 0.67 |
cos | (-100, 100) | 250 | 0.02 | 10.26 |
tan | (-1, 1) | 250 | 0.04 | 0.66 |
sin | near π/2 | 250 | 0.08 | 0.51 |
cos | near π/2 | 250 | 0.66 | 209.14 |
cos | near π | 250 | 0.07 | 0.50 |
Note: near the zeros of a function (e.g. cos at π/2) the relative measure used here inflates, because the mathematical condition number is unbounded there. The large worst-ulp entries for cos come from samples landing very close to a root; absolute error stays at the 2⁻¹⁰⁴ level throughout.
Inverse Trigonometric Functions
| function | domain | samples | median (ulps) | worst (ulps) |
|---|---|---|---|---|
asin | (-1, 1) | 250 | 0.02 | 0.12 |
acos | (-1, 1) | 250 | 0.02 | 0.12 |
atan | (-100, 100) | 250 | 0.02 | 0.09 |
Hyperbolic and Inverse Hyperbolic Functions
| function | domain | samples | median (ulps) | worst (ulps) |
|---|---|---|---|---|
sinh | (-300, 300) | 250 | 0.15 | 1.02 |
cosh | (-100, 100) | 250 | 0.12 | 1.03 |
tanh | (-1, 1) | 250 | 0.23 | 16.32 |
asinh | (-100, 100) | 250 | 0.04 | 0.31 |
asinh | ±2⁻⁴⁰ | 250 | 0.08 | 0.91 |
acosh | (1, 101) | 250 | 0.05 | 0.25 |
acosh | 1 + ε | 250 | 0.12 | 1.09 |
atanh | (-1, 1) | 250 | 0.09 | 0.98 |
atanh | ±2⁻⁴⁰ | 250 | 0.00 | 0.99 |
Note: sinh and tanh lose a few bits for very small arguments to cancellation in exp(x) - exp(-x); the worst cases above (~16 ulps) come from that region.
Special Functions
erf, erfc, and gamma are computed via Float128; its 113-bit significand caps their accuracy at roughly half an ulp of Double64, and the measured values below reflect that route.
| function | domain | samples | median (ulps) | worst (ulps) |
|---|---|---|---|---|
erf | (-1, 1) | 250 | 0.02 | 0.11 |
erfc | (-1, 1) | 250 | 0.02 | 0.11 |
gamma | (0.1, 10) | 250 | 0.02 | 0.11 |
ellipk | (0, 1) | 250 | 0.11 | 0.70 |
ellipk | 1 - 2⁻²⁰⁻⁵⁰ | 250 | 0.16 | 0.93 |
Matrix Functions (identity residuals)
Matrix routines are checked through their defining identities on random matrices, normalized per matrix dimension.
| identity | size | samples | median (ulps) | worst (ulps) |
|---|---|---|---|---|
eigen residual ‖AV−VΛ‖ | 8×8 | 25 | 0.38 | 0.88 |
exp∘log roundtrip | 8×8 | 25 | 1.90 | 3.22 |
sqrt squared | 8×8 | 25 | 1.98 | 3.57 |
sin²+cos²−I | 8×8 | 25 | 0.38 | 0.78 |