Skip to content

Take an interval's size without squaring, so a size past the doubles does not agree - #1966

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-size-past-the-doubles-is-not-taken-to-agree
Oct 20, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-size-past-the-doubles-is-not-taken-to-agree

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

IntervalEvaluation.Agree took the size of each value as sqrt(re^2 + im^2) in doubles. Past about 1.3e154 the 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:

  • Coefficients read in lowest terms at pinned symbols (IsZeroAtPinnedSymbols, reached through InLowestTermsOverTheSymbols and IsZeroAsAValue): a coefficient that large at the pins was taken for zero.
  • Sampled-point checks (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 to c^294, about 2e167 at the pin c = 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:

Run Problems Master Branch
Pocket: slow and timed-out problems, and Rubi's 7.5, 7.6 and 1.2.1.9 1,208 1,019 solved 1,020 solved
Family 1, 40 a file 1,381 1,362 1,362
Family 0, whole 1,814 1,789 1,789
Families 2 to 8, sampled 2,410 2,362 2,356

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.

IntervalEvaluationTest gains a case where two values past the doubles must not agree, and one for a large complex size. ACoefficientPastTheDoublesIsNotTakenForZeroIntegralTest differentiates both antiderivatives back; it fails on master. BREAKING-CHANGES.md has the entry.

Part of #1019.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 20, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 820f8d9 into master Oct 20, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant