-
Notifications
You must be signed in to change notification settings - Fork 5
Number format with arbitrary precision #44
Comments
There are several, for example GMP (GNU Multiple Precision Arithmetic Library), but I don't know about their current status. Note that with any bignum-implementation comes the added headache of the need to allocate and deallocate lists, possibly largish. (OTOH, with only two 64-bit words we already go up to 340282366920938463463374607431768211456, unsigned). But with well-designed interfaces that kind of change might be mostly transparent (coding-wise), except perhaps in the execution times and memory usage? But I'm not an expert in C++, so I don't know all of its perks. |
I don't think we don't need arbitrary precision. I was thinking to use C++ templates with std::arrays. That should be much more efficient, because everything is stored directly on the stack. |
For evaluating programs with bigger number you can use LODA Lab. However this cannot do mining of new programs.
(LODA is indeed a great project!) |
I added native support for big numbers in LODA. No external libraries are used. There is an upper limit of the size (configurable at compile time). Currently we support up to 180 decimal digits. Still room for performance improvements:
|
Awesome. |
We currently use 64-bit signed ints as number format. Many of the sequence terms in the OEIS exceed this size. We should check if there are libraries for big number formats or if it is feasible to implement it ourselves.
The text was updated successfully, but these errors were encountered: