Advanced-math accuracy
Recorded September 19, 2026 — P5
These results describe the original snapshot, not the current source or release. Local artifact paths are provenance records, not public downloads.
Archive index · Current support
The snapshot exposed 97 operations and 404 signatures. The 46 advanced-math signatures used libm 0.2.16 with force-soft-floats on all four local modes.
Accuracy evidence
Apple M1 Pro, macOS arm64/Darwin 27, Node 24.19.0, pnpm 12.4.2, Rust/Cargo 1.96.0 and MPFR 4.2.2. The committed accuracy report records 184 groups and 170,544 comparisons, all passing. The 42,636-input fixture used directed 256-bit intervals with 512-bit confirmation, directly rounded to each target dtype. Four native/Wasm scalar/SIMD modes observed:
| Function | f32 samples | f32 max ULP | f64 samples | f64 max ULP | Budget (both types) |
|---|---|---|---|---|---|
exp | 671 | 1 | 699 | 1 | 2 |
exp2 | 671 | 0 | 699 | 1 | 2 |
expm1 | 671 | 1 | 699 | 1 | 2 |
log | 671 | 1 | 699 | 1 | 2 |
log2 | 671 | 1 | 699 | 0 | 2 |
log10 | 671 | 1 | 699 | 1 | 2 |
log1p | 671 | 1 | 699 | 1 | 2 |
pow | 2732 | 1 | 2808 | 1 | 4 |
cbrt | 671 | 0 | 699 | 0 | 2 |
hypot | 2386 | 1 | 2462 | 1 | 2 |
sin | 671 | 0 | 699 | 1 | 2 |
cos | 671 | 0 | 699 | 1 | 2 |
tan | 671 | 1 | 699 | 1 | 2 |
asin | 671 | 1 | 699 | 1 | 2 |
acos | 671 | 1 | 699 | 1 | 2 |
atan | 671 | 1 | 699 | 1 | 2 |
atan2 | 2386 | 1 | 2462 | 1 | 2 |
sinh | 671 | 1 | 699 | 1 | 2 |
cosh | 671 | 1 | 699 | 1 | 2 |
tanh | 671 | 1 | 699 | 1 | 2 |
asinh | 671 | 1 | 699 | 1 | 2 |
acosh | 671 | 1 | 699 | 1 | 2 |
atanh | 671 | 1 | 699 | 1 | 2 |
Budgets were pow 4 ULP and other functions 2 ULP; the largest sampled result was 1 ULP. This was not a proof over the entire input domain. Zero/infinity signs and NaN classification were separately exact. Full-width/domain samples, boundary neighbors, subnormals, large angles and binary special cases were retained. The oracle regeneration check passed; ordinary tests did not require MPFR.
Tests, backends and performance
Release checks passed with 1,434 TS, eight Rust and three registry tests; New methods covered arrays/out, exact aliases, residency, broadcast, lane-boundary lengths, invalid dtype/length, overlap, disposal and direct ABI misuse. Extension and tarball checks passed. Chromium/WebKit passed 20 tests; Firefox's ten failed before page assertions.
Both scalar backends had 404 V; NEON/SIMD128 had 17 V + 387 F; AVX2 had 17 I + 387 F. All advanced functions were scalar. Other native targets and minimum-Node evidence remained open.
The old bench:p5 (now bench:math) measured 1,638 cases over all 46 signatures, JS, four modes and ordinary/resident output. Seven samples and three warmups were retained. Selected operations spanned 0/1/lane tails/128/1K/16K/1M; others used 128/16K. Direct JS functions and dtype writes were used rather than per-element dynamic function lookup. High-precision correctness remained a separate suite.
| Asset | P4 bytes | P5 bytes | Increase |
|---|---|---|---|
| darwin-arm64 native | 404,080 | 437,184 | 33,104 |
| scalar Wasm | 89,364 | 129,335 | 39,971 |
| SIMD Wasm | 92,248 | 132,611 | 40,363 |
These were uncompressed local asset sizes, not sizes for other native targets. Logs/benchmark were under artifacts/p5/; source/hash/check evidence was retained in artifacts/baseline/p5-2026-09-19/. Overall status remained failed due to Firefox.