You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the above code to print 9999999999. Currently, it prints 1410065407 (which is equal to 9999999999 mod (2^32)). If an integer number fits exactly into a double then I would expect it to be convertible to BigInt.
Yeah good find! Seems as though I missed this when merging it in, but using the numeric type we are using bigint_from_int which is obviously implicitly converting!
Is there an existing issue for this?
Current Behavior
When given a
Number
argument,BigInt.new
truncates to the lowest 32 bits before converting to aBigInt
.Example:
Expected Behavior
I would expect the above code to print
9999999999
. Currently, it prints1410065407
(which is equal to9999999999 mod (2^32)
). If an integer number fits exactly into adouble
then I would expect it to be convertible toBigInt
.Steps To Reproduce
Tested at e43580d. Run the above code snippet.
Anything else?
No response
The text was updated successfully, but these errors were encountered: