float / double support in Python?

Tim Peters tim.one at comcast.net
Sun Feb 9 13:56:44 EST 2003


[Tim]
> Guido never considered abolishing fp,
> though.  He has briefly considered abolishing builtin support
> for complex numbers, but only when I whine about them <0.1j wink>.

[jsaul]
> What are the main objections against complex numbers? Do you mean
> potentially nasty typos such as "0.1j" instead of "0.1*j"?

No, it's purely selfish:  nobody maintains the implementation of complex
numbers in the Python core, and the numerical algorithms are often poor (for
example, until a release or so ago, complex division went insane if either
component of the denominator exceeded the square root of the platform's
largest finite C double). I'm the only one at PLabs with industrial-strength
experience coding numerical algorithms, so the joy of fixing such stuff
usually falls me -- but I don't have time for it, and the relative lack of
bug reports against the cmath module convinces me it's rarely used anyway.
If someone knoweledgable about computer numerics were to volunteer to
maintain and repair this code, my attitude about complex numbers in the core
would improve dramatically <wink>.






More information about the Python-list mailing list