[issue11658] complex sqrt error

Mark Dickinson report at bugs.python.org
Thu Mar 24 11:59:48 CET 2011


Mark Dickinson <dickinsm at gmail.com> added the comment:

I don't see a real problem here:  both cmath.sqrt(-1) and (-1)**0.5 are producing good approximations to the correct result, which is about as much as you can hope for in general with floating-point algorithms.

I wouldn't want to start special-casing the complex power algorithm to produce expected results for given bases or exponents;  the code is complex enough as it is.

Patches to improve the general accuracy of complex.__pow__ would be welcome.

Closing as won't fix.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11658>
_______________________________________


More information about the Python-bugs-list mailing list