Skip to content

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:

Functionf32 samplesf32 max ULPf64 samplesf64 max ULPBudget (both types)
exp671169912
exp2671069912
expm1671169912
log671169912
log2671169902
log10671169912
log1p671169912
pow27321280814
cbrt671069902
hypot23861246212
sin671069912
cos671069912
tan671169912
asin671169912
acos671169912
atan671169912
atan223861246212
sinh671169912
cosh671169912
tanh671169912
asinh671169912
acosh671169912
atanh671169912

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.

AssetP4 bytesP5 bytesIncrease
darwin-arm64 native404,080437,18433,104
scalar Wasm89,364129,33539,971
SIMD Wasm92,248132,61140,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.

Released under the MIT License.