Repository navigation
Take an interval's size without squaring, so a size past the doubles does not agree - #1966
Merged
Rafael-SOWNet merged 1 commit intoOct 20, 2026
Merged
Conversation
…does not agree IntervalEvaluation.Agree took the sizes of two values as sqrt(re^2 + im^2) in doubles. Past about 1.3e154 the square is infinite, so was the tolerance relative to it, and any two values that large agreed. A coefficient of c^294, read in lowest terms at the pinned symbols (c = 3.71), was taken for zero, and (b x^(-4) + b x^(-6) + b x^(-8))/sqrt(1/c^2 + x^2) was answered with two of its three terms missing, wrong at every point. Every check behind DerivativeHoldsAtSampledPoints and IsZeroAsAValue went through the same comparison, and any answer that large at a sampled point passed. 2.5.0 declined the integrand, so the wrong answer never shipped. The size is now the hypotenuse scaled by its larger part, widened outward; a scale that is not finite is left to the decimals. Part of #1019. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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.
IntervalEvaluation.Agreetook the size of each value assqrt(re^2 + im^2)in doubles. Past about1.3e154the square is infinite, so the tolerance relative to it was infinite too, and any two values that large agreed. Two kinds of check went through it:IsZeroAtPinnedSymbols, reached throughInLowestTermsOverTheSymbolsandIsZeroAsAValue): a coefficient that large at the pins was taken for zero.HoldsAtSampledPoints,DerivativeHoldsAtSampledPoints): any answer that large at a sampled point passed, whatever it was.A wrong answer on master that 2.5.0 declined, so it never shipped:
(b x^(-4) + b x^(-6) + b x^(-8))/sqrt(1/c^2 + x^2). Its antiderivative's coefficients run toc^294, about2e167at the pinc = 3.71. Two of its three terms were taken for zero and dropped, and the answer was wrong at every point.(b x^12 + b x^10 + b x^8)/(x^16 sqrt(1/c^2 + x^2))was the same. Both are answered correctly now. This came to light as a wrong answer in a pending branch that asked this question in exactly this spelling.The size is now the hypotenuse scaled by its larger part, so it never squares past the doubles. The bounds are widened outward, and a scale that is still not finite is left to the decimals (
null).Measured on
8a1ef454, branch against master:Re-run alone on both builds, every move is a problem near the budget. Two that master answered in 22–23 s timed out on the branch (7.3.5:50, 7.4.1:369); both have flipped either way in other runs today. No run had a wrong answer.
IntervalEvaluationTestgains a case where two values past the doubles must not agree, and one for a large complex size.ACoefficientPastTheDoublesIsNotTakenForZeroIntegralTestdifferentiates both antiderivatives back; it fails on master.BREAKING-CHANGES.mdhas the entry.Part of #1019.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura