Repository navigation
Compare numerically to half the evaluation's digits, where the comparison was exact - #2062
Merged
Merged
Conversation
…ison was exact AreEqualNumerically evaluated both sides at its check points and compared the values with !=. Two equal expressions computed by different routes differ in their last digits, so the derivative of x ln(x)'s antiderivative, 2 x (-1/4 + ln(x)/2) + 1/x * 2/4 * x^2, read as unequal to x ln(x) at -100 and 100. Two finite values now agree when they differ by no more than half the evaluation's digits, relative to the larger of them or to one; a value that is not finite agrees only with itself, and a NaN is still passed over. A difference of 1e-40 is still a difference. The limit solver's two-sided check goes through the same comparison. The MCP server keeps its own comparison, at positive reals and with an answer for "could not evaluate", and its comment no longer says the library's is exact; its README lists the workarounds that remain. Fixes #1674. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This was referenced Oct 22, 2026
…-to-the-precision # Conflicts: # BREAKING-CHANGES.md # Sources/MCP/README.md
The README listed the workarounds waiting for the library by issue, and every PR that fixed one edited the list, so the PRs fixing #1673-#1676 conflicted with each other one merge at a time. Each workaround links its issue in a comment beside it, which is where it is removed. Part of #1674. 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.
Fixes #1674.
MathS.UnsafeAndInternal.AreEqualNumericallyevaluated both sides at its check points and compared the values with!=. Two equal expressions computed by different routes differ in their last digits. So the derivative ofx ln(x)'s antiderivative,2 x (-1/4 + ln(x)/2) + 1/x * 2/4 * x^2, read as unequal tox ln(x)at -100 and 100.1e-40still counts at the default hundred digits.AreEqualNumericallyToThePrecisionTest: the two cases from the issue fail on master. The pairs that are equal by every route, and the two differences above the tolerance, pass on both. The full unit suite passes (16,709), and so do the MCP tests (325). The library builds for netstandard2.0. The BREAKING-CHANGES entry opens the section for changes since 2.6.0. #2061 opens it too, so whichever merges second has one heading to resolve.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura