Mark Dickinson <[EMAIL PROTECTED]> added the comment: This is not a bug, at least in the sense that the behaviour of Python 2.6 is intentional: asin has branch cuts from 1 to infinity and -1 to - infinity along the real axis. As explained by the note at the top of the cmath documentation, on platforms with signed zeros (which is pretty much all platforms these days), the sign of the imaginary part of the argument is used to determine which side of the branch cut to use. So:
>>> import cmath >>> cmath.asin(complex(2.0, 0.0)) (1.5707963267948966+1.3169578969248166j) >>> cmath.asin(complex(2.0, -0.0)) (1.5707963267948966-1.3169578969248166j) This is fairly standard practice, and usually the right thing in applications; see the Kahan paper referred to at the bottom of the cmath docs. It also follows the suggestions outlined in Annex G of the C99 standard. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com