Repository navigation
Search for numeric roots at the sizes of the equation's numbers (#2643) - #2644
Open
Rafael-SOWNet wants to merge 2 commits into
Open
Rafael-SOWNet wants to merge 2 commits into
Rafael-SOWNet wants to merge 2 commits into
Conversation
The numeric search starts from a grid from -10 to 10 (NewtonSetting.From and To). Its tolerances are made for roots and values of about unit size: the step it settles to is absolute from 1 up, and a root is kept by an absolute residual. 10^20 arcsin(x / 10^20) = x pi / 3 has the roots of arcsin(t) = t pi / 3 times 10^20, and it was answered with 0 alone, as was every k other than 0 in 10^k arcsin(x / 10^k) = x pi / 3, for k from -30 to 30 in steps of 3. Where the scaling is a substitution t = x / K, as in arcsin(x / K) = x pi / (3 K), the solver solves for t first and the grid is never at fault. Written K F(x / K) = 0, it is not. The equation is now searched once more for each decimal size of its whole and rational numbers, at least two orders from 1 and at most six of them. Each search is in x = 10^e t, with the values divided by the power of ten nearest their size at a few unit-size points, so the existing grid and tolerances meet roots and values of unit size. The roots are put back, exactly, by a power of ten. A root found at more than one size is kept once, compared relatively. A search at another size that cannot be run, or whose points are not isolated, is skipped, so it can add roots but never decline an equation the unit-size search answered. Over 84 equations in four families of K F(x / K), complete real root sets go from 9 to 84. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2644 +/- ##
==========================================
- Coverage 86.72% 86.71% -0.01%
==========================================
Files 345 346 +1
Lines 75569 75685 +116
Branches 22086 22128 +42
==========================================
+ Hits 65540 65634 +94
- Misses 5410 5418 +8
- Partials 4619 4633 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
A search at another size runs on the equation divided by the size of its
values at a few unit-size points. A point where the equation is small
beside that size passes the search's absolute residual floor without
being a root. (1 + 4 10^30 x)^(1/3) + sqrt(-1 - 10^30 x) = -4 has no
roots. It is about 10^30 in size away from 0 and 5 + i at 0, and the
search at 10^30 returned 0. AnalyticalEquationSolver took that non-empty
result as the search's answer. WithoutSpuriousRoots then dropped 0 as no
root, and the equation was answered { }, where a search that finds
nothing leaves it unsolved. Two more x-scaled radcheck equations went
the same way.
A root from another size is now added only where it holds in the
equation as written: defined there, and with a residual that
StatementSolver.IsEvidenceAgainst does not count against it beside the
equation's terms. The other sizes can then only add verified roots, and
cannot turn an empty unit-size search into a non-empty one that
verification then empties. The three radcheck equations are unsolved
again, as on master. radcheck at x:10^(-30), x:10^(-20), x:10^(-12) and
x:10^30 agrees with master: 0 of 200 differ at each. The K F(x/K) family
is still 84 of 84 complete.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
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.
Closes #2643
The numeric root search starts from a grid from -10 to 10 (
NewtonSetting.From/To), and its tolerances are absolute: the settling step from 1 up, and the residual a root is kept by.10^20 arcsin(x / 10^20) = x pi / 3has the roots ofarcsin(t) = t pi / 3times 10^20 and was answered with{ 0 }, as was every k ≠ 0 of10^k arcsin(x / 10^k) = x pi / 3. (Written as a substitution,arcsin(x / K) = x pi / (3 K), the solver solves for t first and the grid is never involved.)The equation is now searched once more for each decimal size of its whole and rational numbers (at least two orders from 1, at most six sizes), in
x = 10^e twith its values divided by their size at a few unit-size points, and the roots are put back exactly by a power of ten and de-duplicated relatively. A search at another size that cannot be run, or whose points are not isolated, is skipped, so it adds roots but never declines an equation the unit-size search answered. Entry inBREAKING-CHANGES.md.Measured: over 84 equations
K F(x / K) = 0(K = 10^k, k = -30..30 step 3; F among arcsin(t) - t pi/3, arctan(t) - t/2, arcsin(t) - t/2 - t^3, tanh(t) - t/2), complete real root sets go from 9 to 84, with no false root added. cxcheck's scale differences at x:10^∓30 (15 and 45 of 200) are unchanged: they come fromModulusSolver/the Gröbner path's exact verification, not from this search.A root from another size is added only where it holds as written (second commit): the extra searches run on the equation divided by its value size, so a point near 0 of
(1 + 4·10^30 x)^(1/3) + sqrt(-1 - 10^30 x) = -4passed the search's absolute floor, was dropped by verification, and left{ }where master declines.NewtonSolver.HoldsAsWrittennow admits a root from another size only where the original equation is defined andIsEvidenceAgainstdoes not count its residual against it, so the other sizes can only add verified roots and never turn a decline into{ }. radcheck at x:10^-30, 10^-20, 10^-12 and 10^30 now matches master (0 of 200 differ each); the family stays 84 of 84.Not fixed here:
10^3 tanh(x / 10^3) = x / 2still keeps a false root near 1.1e-13 beside 0 (pre-existing; the residual is judged on the exponential rewrite, whose terms cancel near 0). Filed as #2645.Full UnitTests suite (net10.0, on e095094 + this): 21820 passed, 0 failed, 13 skipped (both commits).
🤖 Generated with Claude Code