Skip to content

Safe integer ranges incorrect #174

@neilalexander

Description

@neilalexander

These numbers look incorrect:

const minUint53 = 0
const maxUint53 = 4503599627370495
const minInt53 = -2251799813685248
const maxInt53 = 2251799813685247

The signed integer range should be -9007199254740991 to 9007199254740991. The unsigned ones should also be shifted appropriately.

See https://tc39.es/ecma262/#sec-number.min_safe_integer and https://tc39.es/ecma262/#sec-number.min_safe_integer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions