The rocket equation produces par-fuel and delta-v figures that ship inside
level data. A value that differs between platforms is the same class of bug
as a desynced replay, so log belongs in the kernel rather than falling back
to the host libm.
Reduce x = m*2^k with m in [2/3, 4/3), then ln(m) = 2*atanh((m-1)/(m+1)).
Accurate to <1e-13 against the host libm across the tested range.
Replaces every host-libm call in the physics source with a kernel built from
IEEE-754-exact operations only, so simulation results are bit-identical on
ARM64/JavaScriptCore and x86-64/V8.
ECMAScript permits Math.sin/cos/atan2 to be implementation-dependent
approximations, and Rot.setAngle and Sweep.getTransform call them for every
rotating body on every step. Without this, a replay recorded on mobile does
not reproduce on desktop, which breaks replay verification and leaderboards.
- add src/common/DeterministicMath.ts (fdlibm-derived polynomials and
Cody-Waite range reduction, plus a seeded mulberry32 PRNG)
- rewire the nine hoisted aliases in Math, Matrix, Rot, Sweep and
dynamics/Position; no host libm call remains in src/
- export DeterministicMath and seedRandom for consumers
- add determinism tests, incl. a free fall matching the analytic solution
All 14 upstream tests still pass (22 total).