Tuvas [EMAIL PROTECTED] writes:
I've been thinking about writing a program to generate the world's
largest prime numbers, just for the fun of it. This would require being
able to hold an 800 digit number into memory (25 megabits, or a
little over 3 megs of memory for just one variable...)
[EMAIL PROTECTED] wrote:
An early alpha-quality release is available at
http://home.comcast.net/~casevh/
Given the module named Decimal in Python 2.4, I'd suggest you to rename
your library.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
Already done for next version. Tentatively, there will be a package
called ar (Arbitrary Radix) and the module will be called BigInt. I'm
also working on an arbitrary radix BigFloat module.
Case
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
...
Python does support large numbers, but it's not very fast for such
large numbers. There is a Python module called GMPY that uses the GMP
(Gnu Multiple Precision) library for faster operations on large
numbers.
As the author of gmpy, I'd like to point out that
[EMAIL PROTECTED] (Alex Martelli) writes:
As the author of gmpy, I'd like to point out that the speed difference
isn't all that large, if all you're doing is ordinary arithmetic -- a
few times at most (it can be better if you need some of GMP's
functionality which gmpy exposes, such as
Paul Rubin wrote:
[EMAIL PROTECTED] (Alex Martelli) writes:
For numbers of this size, won't gmpy use FFT-based multiplication?
That's potentially orders of magnitude faster than ordinary n**2
multiplication.
But Python is no slouch with its use of Karatsuba multiplication.
(in other words,
Paul Rubin wrote:
[EMAIL PROTECTED] (Alex Martelli) writes:
As the author of gmpy, I'd like to point out that the speed difference
isn't all that large, if all you're doing is ordinary arithmetic -- a
few times at most (it can be better if you need some of GMP's
functionality which gmpy
[EMAIL PROTECTED] writes:
Python's native longs use Karatsuba multiplication with is O(n^1.585).
My early version of DecInt (BigDecimal) uses 4-way Toom-Cook ...
Wow, cool! Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Well, as I'll be doing lots of multiplication, guess that GMPY is the
way to go. I'll use DecInt only for converting to strings if I find
anything interesting. This is all just kind of a theoretical aproach,
but, it can be lots of fun. Who knows if Python'll help find the
largest prime number
For more information on how the largest prime number was found, see
www.mersenne.org.
Python does support large numbers, but it's not very fast for such
large numbers. There is a Python module called GMPY that uses the GMP
(Gnu Multiple Precision) library for faster operations on large
numbers.
10 matches
Mail list logo