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

Double.asInteger doesn't convert to big integers #34

Open
ltratt opened this issue May 23, 2020 · 1 comment
Open

Double.asInteger doesn't convert to big integers #34

ltratt opened this issue May 23, 2020 · 1 comment
Labels
spec Needs specification, or is specification related.

Comments

@ltratt
Copy link

ltratt commented May 23, 2020

At least in Java SOM the following:

18446744073709551616.0 asInteger println.

gives the surprising result of:

9223372036854775807

I assume that it's not checking that the double can be represented as an integer, so the result is a semi-random bit pattern?

@smarr
Copy link
Member

smarr commented May 23, 2020

Hm, would probably be desirable to have more consistent behavior here, yes.

@smarr smarr added the spec Needs specification, or is specification related. label May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Needs specification, or is specification related.
Projects
None yet
Development

No branches or pull requests

2 participants