Repository navigation
Read a computed value as a rational only within half the working digits - #2066
Merged
Rafael-SOWNet merged 4 commits intoOct 22, 2026
Merged
Conversation
Real.Create made a value the integer it was near within half the working digits, and the small rational it was near within a fixed 1e-16, whatever the precision. At two thousand digits ln(e^a + sqrt(2) e^(a/2) + 1) was exactly a, where it is a + 1.2e-67, so the derivative of a right antiderivative of 1/sqrt(a + i a sinh(c + d x)) at x = 227283/1250, built on the difference of two such logarithms, lost its imaginary part, and the corpus harness read the row as wrong. The continued fraction now stops within half the working digits, as the integer test does. A number from a float, a double or a decimal carries that type's digits, not the working precision's, and keeps the 1e-16: (Entity)(1m / 3) is still 1/3, and the LaTeX tests writing a cube root as x^(1m/3) still print one. The public FindRational keeps its tolerance too. The derivative is still wrong at 300 digits and NaN at 50 to 200: values below half the working digits are zero, products of nonzero values among them, and those are the next change. Part of #1944. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-a-rational-within-half-the-digits # Conflicts: # BREAKING-CHANGES.md
Passed as an argument, the half-digit tolerance was made on every Real.Create, where it had been made only past the check that almost every value stops at: EvalPolynomialFresh allocated 5.0% more and the kernel gate failed. The rational search now takes the integer test's tolerance, already made there. Part of #1944. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-a-rational-within-half-the-digits # Conflicts: # BREAKING-CHANGES.md
Member
Author
|
The kernel gate failed on allocation: It is now made where the rational search runs, from the integer test's tolerance (
Master is merged in for #2062's BREAKING-CHANGES entry. 🤖 Generated with Claude Code |
This was referenced Oct 22, 2026
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.
Part of #1944.
Real.Createmade a computed value the integer it was near within half the working digits, but made it the small rational it was near within a fixed1e-16, whatever the precision.ln(e^a + sqrt(2) e^(a/2) + 1)was exactlya, where it isa + 1.2e-67.1/sqrt(a + i a sinh(c + d x))atx = 227283/1250is built on the difference of two such logarithms. So at two thousand digits it lost its imaginary part, and the corpus harness read Rubi 6.1.5 row 94 as wrong.float, adoubleor adecimalcarries that type's digits, not the working precision's, so it keeps the1e-16.(Entity)(1m / 3)is still1/3, and the LaTeX tests that write a cube root asx^(1m/3)still print one.FindRationalkeeps its tolerance too.1e-136. That is a change to the floor at zero across the arithmetic, and it is the next PR.AValueKeepsTheDigitsItHasTestasserts five things:1/3that are not1/3;1/3 + 1e-60still1/3.Its four new-behaviour cases fail on master. Two existing tests change, and both changes are deliberate:
HighPrecisionFunctionsTestpasses the tolerance to the exact search it compares the cheap check against.AModulusIsMadeUnderTheDowncastingInForcepinned|75 + 316.22776601683796i|as325with the downcasting on, which was the 1e-16 snap. It is325 + 2.6e-17, and a modulus that is 325 to the working digits is 325.Results:
c614b2c8), is 48,305 of 48,305, with no row moved and no answer's allocation grown.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura