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

Large numbers rounded off give negative numbers #157

Closed
tirkarthi opened this issue Nov 21, 2014 · 1 comment
Closed

Large numbers rounded off give negative numbers #157

tirkarthi opened this issue Nov 21, 2014 · 1 comment

Comments

@tirkarthi
Copy link

say round(5e+19);

gives -9223372036854775808

It does so for every number above 5e+19 but gives the correct output for numbers below it.

Compiled under 64 bit Ubuntu 12.04 with MoarVM backend.

@jnthn
Copy link
Member

jnthn commented Nov 21, 2014

Fixed in 972d95b (plus NQP and Rakudo commits to use the fix). Also added regression test to S32-num/rounders.t.

@jnthn jnthn closed this as completed Nov 21, 2014
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

No branches or pull requests

2 participants