News for hackers. Stuff that matters.
Re:Adding BigInts to V8 by calebh on Wednesday May 02, 2018 @04:57PM (#16981102)
What happens when the num_digits field overflows?
Re:Adding BigInts to V8 by munificent on Wednesday May 02, 2018 @05:19PM (#16981245)
On a 64-bit machine, the max value of num_digits is 18,446,744,073,709,551,616. Since each digit is its own 64-bit value, if num_digits reached its maximum value, you'd need to allocate 147,573,952,589,676,412,928 bytes of memory for the digits themselves, or a little over 147,573 petabytes.
Re:Adding BigInts to V8 by ktpsns on Wednesday May 02, 2018 @05:09PM (#16981184)
In such a case you may have problems to represent the number in memory/storage on a computer anyway.