mirror of
https://github.com/daijro/camoufox.git
synced 2026-11-19 00:07:28 +00:00
The last bit of these differs between glibc (or fdlibm) and the Windows CRT, so one call told a page that a build claiming Windows ran on Linux: against stock 152.0.4 on Windows, sin differed on 22, cos on 26 and tan on 30 of 1,670 inputs, pow on 45 of 1,410. windows-crt-math.patch adds javascript.options.use_ucrt_math, which routes them to ports of ucrtbase.dll's FMA3 code path (browser/additions/js/src/builtin/UcrtMath*.c), keeping SpiderMonkey's own pow fast paths. On 156 the pow hook sits in pow_libm_or_fdlibm, the one place both callers already reach the platform pow. It is built only for 64-bit non-Windows targets, without FP contraction. The launcher turns it on for Windows identities on a non-Windows host, where upstream did nothing; the TypeScript launcher does the same. browser/tests/ucrt-math checks the C alone against ucrtbase.dll on ~127,000 results in the static job. The windows-crt-math guard checks the browser against stock Windows Firefox cold, JIT-hot and constant folded, with a pref-off control that must differ; a missing result counts as a difference. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>