summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/scripts/baseline_diff.py
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-09-24 20:31:54 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-09-24 20:31:54 -0700
commit4672eac1e36ff37394189376217bdc6f2b2e2e4a (patch)
tree04116472bd136bacb902f7b16a28d71cbd717900 /plugins/code-modernization/scripts/baseline_diff.py
parente662d6d338a7abb1a03ba97e1a47fb98d669c81f (diff)
code-modernization: compare floating-point output within a declared tolerance
The equivalence check compared bytes only, which cannot pass for numeric code (Fortran, C, scientific and financial results) whose last digits differ between compilers and math libraries, so those cases pushed people to mask the numbers away. A case can now declare a tolerance, relative or absolute, with a required reason. Only numbers written with a decimal point or an exponent may differ within it; integers and every other byte must match, a relative tolerance above 1% is refused, and the tolerance and the largest difference are recorded in the result. The self-check also fails when a tolerance is loose enough to hide a change to the leading digit of a number.
Diffstat (limited to 'plugins/code-modernization/scripts/baseline_diff.py')
0 files changed, 0 insertions, 0 deletions