casevh at comcast.net wrote:

BigDecimal is a Python class that supports decimal arithmetic on very large integers. BigDecimal was inspired by the posting of BigDec to c.l.py by Tim Peters. BigDecimal implements all the commonly used integer methods. (It doesn't implement any of the binary/shifting operations.)

It has been optimized for performance. It uses a 4x4 Toom-Cook algorithm for multiplication and a new, very fast, division algorithm. If GMPY is available, it will be automatically used.

Performance examples, computing the decimal represendation of the 42nd Mersenne prime:

2**25964951 - 1

Tim Peter's posting to c.l.py: 13 minutes 41 seconds

BigDecimal: 59 seconds

BigDecimal w/gmpy: 10 seconds

BigDecimal is a Python class that supports decimal arithmetic on very large integers. BigDecimal was inspired by the posting of BigDec to c.l.py by Tim Peters. BigDecimal implements all the commonly used integer methods. (It doesn't implement any of the binary/shifting operations.)

It has been optimized for performance. It uses a 4x4 Toom-Cook algorithm for multiplication and a new, very fast, division algorithm. If GMPY is available, it will be automatically used.

Performance examples, computing the decimal represendation of the 42nd Mersenne prime:

2**25964951 - 1

Tim Peter's posting to c.l.py: 13 minutes 41 seconds

BigDecimal: 59 seconds

BigDecimal w/gmpy: 10 seconds

package):

http://www.egenix.com/files/python/mxNumber.html

There's a C type called Integer in that package that basically

wraps the GMP integer type.

--

Marc-Andre Lemburg

eGenix.com

Professional Python Services directly from the Source (#1, Apr 01 2005)

Python/Zope Consulting and Support ... http://www.egenix.com/

mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/

mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/

mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/

mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::