Repository navigation
Make a whole number the rational search finds an integer - #2071
Merged
Rafael-SOWNet merged 1 commit intoOct 22, 2026
Merged
Conversation
The continued fraction built its result with new Rational(...), past the check in Rational.Create that turns a denominator of one into an Integer, so a decimal just below a whole number came back as the Rational 1/1 or 3/1: not an Integer, and not equal to 1 or 3. Fixes #2069. 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 #2069.
new Rational(...). That skips the check inRational.Createthat turns a denominator of 1 into anInteger. So a decimal just below a whole number came back as theRational1/1or3/1. Such a value is not anInteger, and(Entity)0.9999999999999999999999999999m == 1wasfalse.Rational.Create.NumericDowncasting.AWholeNumberFromTheRationalSearchIsAnIntegercovers1and3; on 2.6.0 they are1/1and3/1.Results:
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura