3.2*2 is 9.6 ... or maybe it isn't?

Mensanator mensanator at aol.com
Fri Jun 26 01:53:39 CEST 2009

On Jun 25, 6:43 pm, Scott David Daniels <Scott.Dani... at Acm.Org> wrote:
> Robert Kern wrote:
> > ... I wish people would stop representing decimal floating point arithmetic
> > as "more accurate" than binary floating point arithmetic. It isn't.
> > Decimal floating point arithmetic does have an extremely useful niche:
> > ...
> Well, we don't actually have an arbitrary-precision, huge exponent
> version of binary floating point.  In that sense the Decimal floating
> point beats it.  Not that it would be too hard to have such a floating
> point in Python (long for mantissa, int for exponent, ...), but we don't
> in fact have such a module in place.

We have the gmpy module which can do arbitray precision floats.

>>> gmpy.pi(600)

> --Scott David Daniels
> Scott.Dani... at Acm.Org

More information about the Python-list mailing list