Skip to content

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

Open
@ltratt

Description

@ltratt

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    specNeeds specification, or is specification related.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions