Skip to content

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