Repository navigation
Put each point where a radicand is zero back into an equation Newton's method answered - #2497
Merged
Merged
Conversation
…s method answered
A radical's derivative is infinite where its radicand is zero, and Newton's method does not
converge to a root there: sin(sqrt(x)) = x was { 0.7686… } without its root 0, and
cos(1 - sqrt(x)) - x = cos(1) { 0.3900… } without 0. Where Newton's method answers, each zero of
a polynomial radicand is now put into the equation and kept where it simplifies to exactly 0, and
a decimal within 1e-10 of one is dropped as its copy. sqrt(x) + x = cos(sqrt(x)) - 1, unsolved
since #2496, is { 0 }.
Of 21 radical equations, these three gain 0 and the rest are unchanged; radcheck and logcheck on
the same 300 equations as master, seed 1116, have no findings. Full check: 21109 of 21122 unit
tests pass, 13 skipped; BoundCheck, RootCheck (596/596), CasBench (0 wrong), SimpSweep,
RuleCheck, PropCheck clean; CanonCheck, Confluence and ModenovCorpus match their baselines.
Follows #2495
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2497 +/- ##
=======================================
Coverage 86.89% 86.90%
=======================================
Files 336 336
Lines 73571 73587 +16
Branches 21413 21419 +6
=======================================
+ Hits 63932 63951 +19
+ Misses 5191 5187 -4
- Partials 4448 4449 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Follows #2495 and #2496.
Newton's method cannot converge to a root where a radicand is zero, because a radical's derivative is infinite there. So an equation it answered left that root out:
sin(sqrt(x)) = xwas{ 0.7686… }without0. Where Newton's method answers, each zero of a polynomial radicand is now put into the equation. It is kept where the equation simplifies to exactly0, and a decimal within 1e-10 of one is dropped as a copy of it.Measured on 21 radical equations, against master's build before #2496 (the 2.8.0 solver):
sqrt(x) + x = cos(sqrt(x)) - 1{ }{ 0 }(unsolved after #2496 alone)sin(sqrt(x)) = x{ 0.7686… }{ 0, 0.7686… }cos(1 - sqrt(x)) - x = cos(1){ 0.3900… }{ 0, 0.3900… }x + sqrt(x) = e^(sqrt(x)) - 1{ 0, 3.21586080818110353… }{ 0, 3.21586080818110264… }, from #2496The other 17 are unchanged. Against mpmath (every root with
|sqrt(x)| <= 12), each of the first three now has all of its real roots. They still lack complex roots far from the origin,2.55 ± 45.0ithe nearest for the first, which lie outside Newton's search region; master lacks them as well.The generated checks were run on the same 300 equations as master, seed 1116.
radcheck(square and cube roots) has no findings, with the same five unsolved;logcheckhas no findings.Full check on the branch: 21,109 of 21,122 unit tests pass (13 skipped), along with the MCP, Terminal, Interactive and F# suites and the AOT smoke test. BoundCheck, RootCheck (596/596), CasBench (0 wrong), SimpSweep, RuleCheck and PropCheck are clean, and CanonCheck, Confluence and ModenovCorpus match their baselines.
BREAKING-CHANGES.mdhas the entry after #2496's, and #2496's row forsqrt(x) + x = cos(sqrt(x)) - 1now reads{ 0 }. #2496's test for it now expects0rather than an unsolved answer.🤖 Generated with Claude Code