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

fix: More proper Math.round #1857

Merged
merged 1 commit into from
May 19, 2021
Merged

fix: More proper Math.round #1857

merged 1 commit into from
May 19, 2021

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented May 19, 2021

Previous implementation was incorrect for maximum mantissa values.

Edge cases current:

Math.round(+9007199254740991) -> +9007199254740992
Math.round(-9007199254740991) -> -9007199254740990

Edge cases fixed:

Math.round(+9007199254740991) -> +9007199254740991
Math.round(-9007199254740991) -> -9007199254740991

Fix #1856

  • I've read the contributing guidelines

@MaxGraey MaxGraey merged commit 5e19467 into AssemblyScript:master May 19, 2021
@MaxGraey MaxGraey deleted the fix-math-round branch May 19, 2021 20:42
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.

a small bug in Math.round with some values between 2**52 and 2**53
1 participant