[Python-Dev] Can 3.1 still be built without complex?

Antoine Pitrou solipsis at pitrou.net
Thu Oct 15 21:17:42 CEST 2009


Mark Dickinson <dickinsm <at> gmail.com> writes:
> 
> There's one respect in which complex is slightly more tightly
> integrated in py3k than in trunk:  raising a negative number to a
> non-integer power (e.g., (-1)**0.5) gives a complex result in py3k.

>>> (-1)**.5
(6.123031769111886e-17+1j)

Don't we have a precision problem here? 0.5 is supposed to be represented
exactly, isn't it?





More information about the Python-Dev mailing list