fix(cam-blend): first-principles FD error bound in curvature proptest #80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "patman/blend-fd-bound"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The FD-curvature proptest in cam-blend produced two genuine random counterexamples (septics with large curvature-rate endpoints, |k'| up to ~36): its ad-hoc
1e-5 * scaletolerance ignored the finite-difference TRUNCATION error, which dominates in that regime. The exact-math side (curvature_at) was never wrong; the test's error model was.Replaces the tolerance with a first-principles interval bound computed from the spline's own coefficients:
E1 = h^2/6 * M3 + 2*eps*P/h,E2 = h^2/12 * M4 + 4*eps*P/h^2(M3/M4/P = coefficient-sum bounds on max |p'''|, |p''''|, |p| over [0,1]), cross-product error propagationdc = s*E2 + |d2|*E1 + E1*E2, and enclosure[lo, hi]containing both the true and FD curvature magnitudes. Both counterexamples are checked in as pinned regression seeds (they must now pass), and a deterministic companion test pins the bound at ~2.6e-6 on a gentle spline so the interval can never silently go vacuous.Adversarially reviewed (independent re-derivation of every bound term, enclosure proof, seed replay x2): PASS, no findings above INFO.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.