Fix: _local_order divided by fp*fp that underflows to 0 for a tiny nonzero slope (ZeroDivisionError, caught by the sweep harness and charged as a failure - this is what had moved Table 6's order cells after the sign fix). Pinned by a test that fails on the old code. Every sweep file regenerated on the server (run_all_sweeps.sh). verify_article: skip result files that are not grid lists (it crashed on the out-of-sample dicts). Verifier now completes: 224 OK, 57 stale numbers in the paper to update (Table 6 again 7 of 7).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -487,3 +487,12 @@ def test_close_and_sub_measured_in_development():
|
||||
p19 = lambda x: x ** 19 # noqa: E731
|
||||
assert _n(p19, -10.0, 100.0, APRIME) == _n(p19, -10.0, 100.0, a_)
|
||||
assert _n(lambda x: 3.0 * x - 1.0, -2.0, 5.0, APRIME) == 4
|
||||
|
||||
|
||||
def test_local_order_declines_when_the_slope_square_underflows():
|
||||
"""Bug 2026-09-21: fp != 0 but fp*fp == 0 raised ZeroDivisionError; the sweep harness
|
||||
charged it as a failure (Table 6 order cells). Now the estimator declines (m = 1)."""
|
||||
from simroot.pure import _local_order
|
||||
# three points on a line of slope 1e-170: fp ~ 1e-170, fp*fp underflows to 0
|
||||
s = 1e-170
|
||||
assert _local_order(3.0, 3.0 * s, 2.0, 2.0 * s, 1.0, 1.0 * s) == 1.0
|
||||
|
||||
Reference in New Issue
Block a user