Reducing types

Paul McGuire ptmcg at austin.rr.com
Sun Feb 10 20:47:38 CET 2008


On Feb 10, 1:19 pm, bearophileH... at lycos.com wrote:
> So why not adopt the Decimal (IEEE 854) as the standard
> "float" for Python (if speed is a concern, than a mfloat type may be
> introduced, it's a "machine float", it's essentially the "float" of
> Python 2.5, operations between a float and a mfloat give a mfloat)? It
> can reduce some FP bugs, and avoid those 5.89 + 3.99 =
> 9.879999999999999 bugs that puzzle newbies, that are okay in a very
> fast low-level language like C++, but probably unfit for a high-level
> one :-)
>
> Bye,
> bearophile

Sounds like you've been reading about Cobra...

-- Paul



More information about the Python-list mailing list