Suppose I have a string of a non-decimal representation of a number beyond Number.MAX_SAFE_INTEGER
. How would I get a BigInt
of that number?
Were the string a representation of a decimal number, I'd just have BigInt(string)
, but the number is represented non-decimally.
Note: for my application, efficiency matters.
Edit: I'm looking for a general technique that works for arbitrary bases.
Asked
Active
Viewed 61 times
-2

chazsolo
- 7,873
- 1
- 20
- 44

Daniel Kaufman
- 1
- 2
-
1In which base is the number? – Sami Hult Dec 10 '18 at 18:11