On Dec 28, 6:50 am, Mensanator <mensana...@aol.com> wrote: > But with a 64-bit processor, that limitation no longer stops me. > > i: 11 bits: 10,460,353,205 decimals: 3,148,880,080 > i: 12 bits: 94,143,178,829 decimals: 28,339,920,715 > > Wow! 94 billion bits! 28 billion decimal digits! > > Of course, once one wall falls, you get to go up against the next > one. > For generation 13, I get: > > gmp: overflow in mpz type > Abort trap > > Hmm, not sure what "overflow" means in this context, but I suspect > it ran out of memory, I probably should have gotten the MacBook Pro > with 8 GB of ram. But then, maybe it wouldn't help.
I don't think this was due to running out of memory: it looks like gmp uses the 'int' C type to count the number of limbs in an mpz, which would make the maximum number of bits 2**31 * 64, or around 137 billion, on a typical 64-bit machine. Maybe there's a configure option to change this? For Python longs, the number of limbs is stored as a signed size_t type, so on a 64-bit machine memory really is the only limitation. -- Mark -- http://mail.python.org/mailman/listinfo/python-list