Last active
March 4, 2020 20:39
-
-
Save thawkin3/afa508bd12ade35450966685a1eb890d to your computer and use it in GitHub Desktop.
Working with large numbers with BigInt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const biggestNumber = BigInt(Number.MAX_SAFE_INTEGER) // 9007199254740991n | |
const correctLargerNumber = biggestNumber + 10n | |
// should be: 9007199254741001n | |
// actually stored as: 9007199254741001n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment