-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: Handle rounding just above kMaxRep more accurately #7389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ximinez
wants to merge
131
commits into
ximinez/number-round-maxrep-down
Choose a base branch
from
ximinez/number-round-maxrep
base: ximinez/number-round-maxrep-down
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+658
−149
Open
Changes from 129 commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
b40d2a8
fix: Fix a rounding error at the Number::maxRep cusp
ximinez a2b21d7
Fix AI-identified mistakes
ximinez b050c15
Fix clang-tidy issues, and more AI complaints
ximinez 175a041
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 1b6047a
More clang-tidy changes: AMMExtended_test member and Number_test incl…
ximinez d03274b
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 22d2703
What is it going to take to get clang-tidy to shut up?
ximinez cd0f49a
Address more nitpicky AI comments
ximinez 5558e1b
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 30334cd
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 5a40416
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 7c9a56f
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez e22938d
AI review feedback: createGuards
ximinez d7d5b83
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 47f30c9
Fix broken unit tests: EscrowToken
ximinez 4c7c019
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez ae03b30
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 46b946b
clang-tidy: missing include
ximinez 69656d6
clang-tidy: Avoid nested "?:" in global Rules initialization
ximinez cd2fcf0
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez b69b924
fixup! clang-tidy: Avoid nested "?:" in global Rules initialization
ximinez ddfb7ee
clang-tidy: {}
ximinez 70c6e01
clang-tidy: this is ridiculous
ximinez 6964013
Merge remote-tracking branch 'XRPLF/develop' into ximinez/number-fix-…
ximinez 09f2d06
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 09ae5b7
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez c8947c6
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 4c7ea64
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 71cf996
Review feedback from @tapanito: lambda checks condition in doRoundUp
ximinez 8b56749
Apply suggestions from Copilot code review
ximinez aea19df
Apply suggestions from @Tapanito code review
ximinez 3a4b92b
Change the priority of the amendments for large mantissas
ximinez 42fda85
Fix more AMM tests, and to not exclude fixCleanup3_2_0
ximinez 8e06e78
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 61bdd6f
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 7f64c33
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 4ab886b
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 48b1716
Make Number::operator/= significantly more accurate
ximinez 75dfc65
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 84ca271
Address some AI review feedback: predeclare, include, format, comment
ximinez fbee034
clang-tidy: implicit bool conversion
ximinez d684431
clang-tidy: missing header
ximinez 27456fa
Use the local range instead of calling a function
ximinez e89e6f5
Merge remote-tracking branch 'XRPLF/ximinez/number-fix-maxrepcusp' in…
ximinez 100ec46
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 8ab904d
Merge branch 'ximinez/number-fix-maxrepcusp' into ximinez/number-divi…
ximinez a963035
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez e851e80
Merge branch 'ximinez/number-fix-maxrepcusp' into ximinez/number-divi…
ximinez 1e7876a
Merge branch 'develop' into ximinez/number-fix-maxrepcusp
ximinez 12670b0
Merge branch 'ximinez/number-fix-maxrepcusp' into ximinez/number-divi…
ximinez 5abecb9
Significant rewrite
ximinez ae9c72b
Test optimization: Number_test::pow10
ximinez 4ec049e
Minor fixes: missing include, variable init, typo
ximinez 5333422
Merge remote-tracking branch 'XRPLF/develop' into ximinez/number-divi…
ximinez 8dcd88e
Tweak how the denominator is handled in division
ximinez de2efa5
Remove TMax entirely from normalizeToRange; check type matching directly
ximinez 18ac8a0
Merge branch 'develop' into ximinez/number-division-accuracy
ximinez 7b66b42
Merge branch 'develop' into ximinez/number-division-accuracy
ximinez dadf4d7
Merge branch 'develop' into ximinez/number-division-accuracy
ximinez 06a3f76
Skip clang-tidy false positive: misc-include-cleaner
ximinez 2fdfd2b
Review feedback from Tapanito and AI
ximinez cd21d74
Update the testUpwardRoundsDown test to run under all scales
ximinez be9ae88
Accept AI suggestion
ximinez c056903
Apply suggestions from code review
ximinez f6a26ca
CI feedback: Add test cases covering other rounding modes
ximinez d1af39d
test: Add another rounding unit test
ximinez 9f872f2
Include upward, write tests based on "expected" behavior
ximinez 261508a
Merge remote-tracking branch 'XRPLF/develop' into ximinez/number-roun…
ximinez 35bee87
Experimental: Scale addition operands up to preserve accuracy
ximinez 9e8c3ca
Improve accuracy of Number::operator+=
ximinez c84939c
Remove the kMaxRep+1 rounding tests
ximinez 51902cd
Revert "Remove the kMaxRep+1 rounding tests"
ximinez 015d9a6
Round mantissas between kMaxRep and kMaxRepUp
ximinez b5574ba
Add line numbers to Number::to_string test
ximinez 50c0d9f
Handle a whole bunch of edge cases
ximinez aa88887
Merge branch 'develop' into ximinez/number-round-maxrep-down
ximinez e1295d1
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez f1bb4de
clang-tidy: template param names, const correctness, braces
ximinez 74c66d0
refactor: Construct Number::Guard from MantissaRange or relevant fields
ximinez 012c67a
Rework subtraction rounding (again) for more accuracy
ximinez 961ac66
Improve comment descriptions
ximinez 2f70112
Merge remote-tracking branch 'upstream/develop' into ximinez/number-r…
ximinez 3a5c850
Include rounding in failed unit tests
ximinez 8743be8
Rollback Number class changes; show the fix works without side effects
ximinez c165af4
Revert "Rollback Number class changes; show the fix works without sid…
ximinez b2cea73
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez d7ce0e2
Fix formatting, add an assert
ximinez 121786a
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez fe64b99
Reorganize the subtraction tests
ximinez f9183aa
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez 308e46d
Clean up tests
ximinez 5bccfe2
clang-tidy: Guard public member variable names; Missing include
ximinez 6da1f22
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez 85980ae
Fix broken unit tests
ximinez 12741a2
Cleanups, mostly from previous merge, plus a few outdated comments
ximinez d9c63cb
Update to use a new amendment, since this PR will not be part of 3.2.0
ximinez 44f3011
Merge remote-tracking branch 'XRPLF/develop' into ximinez/number-roun…
ximinez 5bafcee
Merge remote-tracking branch 'XRPLF/develop' into ximinez/number-roun…
ximinez 63f1a40
Clean up the "New" names
ximinez 9924b6c
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez 4139ebb
Fix issues introduced by prior merge, and new MantissaRange
ximinez 66ff72f
clang-tidy: rename MantissaScale enums from "3_2_0" to "320"
ximinez 48d1c70
Future proofing: Rename Large and Enabled to Large330 and Enabled330
ximinez 902fbdc
Also fix local 3_2_0 variable names
ximinez 1477747
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez e4dafa3
Update names due to prior merge
ximinez d8e03a8
Update more names due to prior merge
ximinez 1bb1d71
test: Add more Number edge case tests, showing failures
ximinez b087545
Number improvements
ximinez 308e00f
Merge commit 'b087545' into ximinez/number-round-maxrep
ximinez 520efde
Merge commit '5703ca5' into ximinez/number-round-maxrep
ximinez f8f899d
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez 463fb88
Apply suggestions from AI code review
ximinez 1ef0c5a
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez 3059770
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez 095e141
Apply suggestions from AI code review
ximinez a63bab2
Cleanups: Comments, variable names, one test case
ximinez 22a7f5b
Fix assertion typo src/libxrpl/basics/Number.cpp
ximinez 6853672
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez 8f51891
Use constexpr in one more place
ximinez 51781c4
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez 2f59cb0
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez b16a761
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez 069fc99
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez 39d8507
Merge branch 'ximinez/number-round-maxrep-down' into ximinez/number-r…
ximinez 6179b05
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down'…
ximinez da39607
Address review feedback from @TimothyBanks and @gregtatcam
ximinez 8250aa2
Remove changes to Number.cpp
ximinez 4124a1d
Revert "Remove changes to Number.cpp"
ximinez 7cb224e
Update some comments, and const correctness
ximinez aadf3c6
Remove some overly verbose unit test log messages.
ximinez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.