[Python-3000] Math in Python 3.0
Antoine Pitrou
solipsis at pitrou.net
Sun May 14 13:04:45 CEST 2006
Le dimanche 14 mai 2006 à 11:01 +1000, Nick Coghlan a écrit :
> Fredrik Johansson wrote:
> > For example, square roots are known as math.sqrt(x) for floats,
> > cmath.sqrt(x) for complex numbers, x.sqrt() for decimals, and
> > gmpy.sqrt(x)/gmpy.fsqrt(x) for gmpy's types. Oh, and SciPy has its own
> > sqrt function that works on arrays (but not Decimals or gmpy's types).
>
> Py3k's function overloading should fix this:
Or you can just write value**0.5
(which doesn't work with decimals, however)
More information about the Python-3000
mailing list