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
NQP converts large integers to floats when it shouldn't/doesn't need to #363
Comments
Fixes R#2157 #2157 The cause of the bug is NQP apparently uses doubles to handle its ints[^1]. 2**52 is the limit under which every number is representable in a double, which is why when we bumped up[^2] the point at which we switched to bigints in Rakudo to be over that limit, we brought in the NQP's limitation into Perl 6 land. Fix by dialing down the switch to bigint to occur before we go over the 2**52 limit. The NQP Issue[^1] will resolve the problem in NQP land and once that's done, I presume we can bump up the limit in rakudo once again. [1] N#363 Raku/nqp#363 [2] b61b3c7
|
FWIW, this problem had impacted Perl 6 numerics too (R#2157) In rakudo/rakudo@fec1bd74f9 and rakudo/rakudo@8e2c70fa15, I avoided that issue by going under the 2**52 limit under which every integer is representable in double. Once this issue is fixed, I think we can bump up that limit in Rakudo again. |
|
FYI, is it relevant? |
|
Here might be code snip could we auto-detect if we need bigint instead of int in |
Originally posted in https://rt.perl.org/Ticket/Display.html?id=131385 by ddgreen @ gmail.com
The text was updated successfully, but these errors were encountered: