3 ms·
When dealing with numbers of such magnitude, how are they stored in memory?
by littledot5566 14y ago
When dealing with numbers of such magnitude, how are they stored in memory?
- iand 14y agoEven naively 2^257885161-1 can be represented with 257885161 bits, or 30MB.
- kedean 14y agoI'm not sure how GIMPS does it, but if you're interested in how it CAN be done you could look into the GMP library for C.
- Dubslow 14y agoIt's definitely just a standard lots-of-bits. Every bit of information is needed, lose one and the whole test will be wrong. For current wavefront exponents, like 2^60,000,000-1, save files are around 8 MB, or ~60M bits -- exactly what you'd expect. Also Prime95 doesn't use GMP, its code is all hand-coded assembly, optimized specifically for the LL test and x86 architecture, written by one very dedicated George Woltman.