fix[lang]: define rounding mode for sqrt#4486
Merged
charles-cooper merged 7 commits intovyperlang:masterfrom Feb 23, 2025
Merged
fix[lang]: define rounding mode for sqrt#4486charles-cooper merged 7 commits intovyperlang:masterfrom
charles-cooper merged 7 commits intovyperlang:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4486 +/- ##
=======================================
Coverage 92.06% 92.06%
=======================================
Files 120 120
Lines 17330 17330
Branches 2932 2932
=======================================
Hits 15955 15955
Misses 957 957
Partials 418 418 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cyberthirst
reviewed
Feb 22, 2025
| ) | ||
| @hypothesis.example(value=Decimal(SizeLimits.MAX_INT128)) | ||
| @hypothesis.example(value=Decimal(0)) | ||
| @hypothesis.example(value=Decimal("0.9999999998")) |
Collaborator
There was a problem hiding this comment.
please leave a link to the advisory to explain the values GHSA-2p94-8669-xg86
Collaborator
|
let's please also mention the rounding behavior in the documentation |
Member
Author
|
cyberthirst
approved these changes
Feb 23, 2025
lemenkov
pushed a commit
to fedora-ethereum/vyper
that referenced
this pull request
Feb 27, 2025
prior to this commit, the rounding mode for `sqrt()` is undefined, which could be an issue for applications which use `sqrt()` to determine boundary conditions. this commit ensures the result is rounded down.
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.
What I did
fix for GHSA-2p94-8669-xg86
prior to this PR, the rounding mode for
sqrt()is undefined. this PR ensures the result is rounded down.How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture