Files
odfstudio/include/rtl
Jakub Trzebiatowski 0430226229 tdf#129606 move approxDiff to rtl::math and fix ARM64 rounding errors
Move the approxDiff heuristic from the sc unnamed namespace to rtl::math and
disable floating-point contraction (FMA) for this function.

On ARM64 (Apple Silicon), the use of Fused Multiply-Add (FMA) results in
higher intermediate precision during floating-point operations. While
mathematically more accurate, this prevents legacy rounding heuristics in
approxDiff and approxValue from detecting and cleaning rounding artifacts
in series generation (e.g., 1.1 - 1.0).

Disabling fp-contract forces intermediate rounding to 64-bit IEEE 754
limits. This ensures the noise expected by the approximation logic is
present, restoring consistency with x86-64 behavior and fixing issues where
values like 6.0 are incorrectly rendered as 6.00000000000001.

Change-Id: I54a0f748be6cf817db1f3bdcfd2b355320c3a617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203233
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-04-08 20:37:27 +02:00
..
2025-07-07 15:37:55 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…