Skip to content
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

Avoid overflow on sqrt of Decimal upper bound #1679

Merged
merged 2 commits into from Nov 5, 2019

Conversation

iamdefinitelyahuman
Copy link
Contributor

@iamdefinitelyahuman iamdefinitelyahuman commented Nov 5, 2019

What I did

  • Fixed an overflow when attempting to calculate the sqrt of 2**127

How I did it

vyper/functions/functions.py line 1213, divide before adding.

How to verify it

Run the tests. I've added a new test case to specifically check the upper and lower bounds, as this was discovered by fuzzing.

Description for the changelog

  • Bugfix: sqrt overflow on upper bound of Decimal

Cute Animal Picture

image

Copy link
Contributor

@jacqueswww jacqueswww left a comment

Cool to see latent fuzzy kicking in :)

@fubuloubu fubuloubu merged commit 181c70d into vyperlang:master Nov 5, 2019
3 checks passed
@fubuloubu fubuloubu mentioned this pull request Nov 6, 2019
@iamdefinitelyahuman iamdefinitelyahuman deleted the sqrt-maxnum branch Dec 8, 2019
@protolambda protolambda mentioned this pull request Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants