Repository navigation
A root in exact numbers is put back to the working precision - #2325
Merged
Rafael-SOWNet merged 3 commits intoNov 2, 2026
Merged
Conversation
Every root is put back into its equation, and IsEvidenceAgainst dropped one only where it left more than a hundredth of the largest term. That bound was set for roots found numerically, which are only as accurate as the search that found them. A root in exact numbers, put into an equation of exact numbers, evaluates to the working precision, so a true one leaves only rounding and a spurious one a whole quantity, and the bound let a near spurious one through: (3x - 4) sqrt(x) + 3 + 3x - 4x^2 = 0 is solved by squaring into a quartic, and one of the quartic's roots, 1.3233 in radicals, leaves 0.069 against a largest term of 7. 2.6.0 and master answer it. An equation and root that are exact numbers in sums, products, quotients and rational powers are now held to half the digits of DecimalPrecisionContext, 10^-50 of the largest term by default. A function, a constant such as pi, or a decimal keeps the hundredth: a special function may be evaluated in doubles, and a decimal is only as accurate as what found it. The same test reads a system's rows, which it holds the same way. Generated equations against master: the radical cross-check's powers-of-x mode, 1000 at seed 41, goes from 8 findings to 7, the unsound 1.3233 removed; the 7 are roots of polynomials, which #2324 answers. At seed 31 (200), the default mode (400 at seed 21), random polynomials (200 at seed 5) and generated systems (1190) are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2325 +/- ##
==========================================
- Coverage 86.74% 86.74% -0.01%
==========================================
Files 312 312
Lines 68422 68437 +15
Branches 19899 19907 +8
==========================================
+ Hits 59351 59363 +12
- Misses 4914 4916 +2
- Partials 4157 4158 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ated The exact branch of IsEvidenceAgainst evaluated every term of the equation again for the largest, which the decimal branch skips for a residual under 10^-6. A true root in exact numbers leaves 0 at the working precision, and no more than share^2 is under the bound whatever the terms are. The exactness check walks the tree by hand: Nodes builds lazy enumerators over a fresh substitution for every root checked. SolveEasy allocated 491,797 B/op against master's 452,228, +8.7%, and the gate refused it at 9.8%; now 452,580, +0.08%. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet
deleted the
an-exact-root-is-checked-to-the-working-precision
branch
November 2, 2026 04:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every root is put back into its equation, and
IsEvidenceAgainstdropped one only where it left more than a hundredth of the largest term. That bound,RelativeResidualTolerance, was set for roots found numerically, which are only as accurate as the search.A root in exact numbers, put into an equation of exact numbers, is evaluated to the working precision. A true root leaves only rounding, and a spurious one leaves a whole quantity.
(3x - 4) sqrt(x) + 3 + 3x - 4x^2 = 0is solved by squaring into a quartic. One of the quartic's roots, 1.3233 in radicals, leaves 0.069 against a largest term of 7, so the hundredth kept it. 2.6.0 and master answer it, beside the three true roots.An equation and root that are exact numbers in sums, products, quotients and rational powers are now held to half the digits of
DecimalPrecisionContext: 10^-50 of the largest term by default. That scales if a user lowers the precision. A function, a constant such aspi, or a decimal keeps the hundredth, because a special function may be evaluated in doubles, and a decimal is only as accurate as what found it. The same test reads a system's rows at rational sample points, which it holds the same way.Generated equations, this branch against master at a2604a4, which is merged into it:
xmode, 1000 at seed 41sqrt(2)orsqrt(3), 200 at seed 7BREAKING-CHANGES.mdhas an entry. Test:AnExactRootIsCheckedToTheWorkingPrecisionTest, which fails on master.🤖 Generated with Claude Code