Use truncation instead of rounding for big.Int division#4184
Merged
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 26e0f76 Collapsed results for better readability
|
6 tasks
RZhang05
approved these changes
Aug 28, 2025
Member
Author
|
Going to merge this PR, so that we can get a preview release (and then a CLI build) out for people to test the new behaviour. Merging the implementation doesn't mean this change is final, but rather is still very much subject to the outcome of the FLIP onflow/flips#344. If the sentiment is not positive on the FLIP, we can revert the PR. It's much more easier to revert, than having to manage separate branches for all the downstream dependencies needed for the CLI preview release. |
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.
Fix #4172
Implements FLIP: onflow/flips#344
Description
Use truncation division (
big.Int.Quo()) instead of rounding, for number types backed bybig.Int, to be consistent with the rest of the number types that are backed by Go's primitive values.masterbranchFiles changedin the Github PR explorer