Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
73
rated 0 times [  79] [ 6]  / answers: 1 / hits: 24048  / 12 Years ago, mon, november 26, 2012, 12:00:00

15955067621307336078.toString(36); returns '3d7vzfy5k2as8' in Javascript because the large integer cannot be represented (the correct answer is '3d7vzfy5k29ou').



Does someone have a clever function that takes a large integer as a string and converts it to base 36?


More From » integer

 Answers
4

Use this BigInt class, which allows conversion of arbitrarily large integers to any arbitrary base between 2 and 95. Use the bigInt2str() method to perform the conversion.


[#81784] Sunday, November 25, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kristopher

Total Points: 58
Total Questions: 103
Total Answers: 102

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
;