Skip to content

doc error: JavaScript safe range starts from -(2^53 - 1) not from -2^53 #1081

@malaire

Description

@malaire

Documentation error at Basics.Int (source):

of that range, the behavior is determined by the compilation target. When
generating JavaScript, the safe range expands to `-2^53` to `2^53 - 1` for some
operations, but if we generate WebAssembly some day, we would do the traditional

The safe range starts from -(2^53 - 1) and not from -2^53.

This is mentioned e.g. at MDN:

The Number.MIN_SAFE_INTEGER constant represents
the minimum safe integer in JavaScript (-(2^53 - 1)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions