Message183342
This is not easy to avoid, I'm afraid, and it's a consequence of Python's usual rules for mixed-type arithmetic: (-0-0j) is interpreted as 0 - (0.0 + 0.0j) --- that is, the 0j is promoted to a complex instance (by giving it zero real part) before the subtraction is performed. Then the real part of the result is computed as 0.0 - 0.0, which is 0.0. Note that the first 0.0 comes from converting the *integer* 0 to a complex number. If you do -0.0-0.0j you'll see a different result:
>>> -0.0-0.0j
(-0+0j) |
|
Date |
User |
Action |
Args |
2013-03-02 19:17:11 | mark.dickinson | set | recipients:
+ mark.dickinson, eric.smith, ezio.melotti, skrah, mjacob |
2013-03-02 19:17:11 | mark.dickinson | set | messageid: <1362251831.58.0.106615041141.issue17336@psf.upfronthosting.co.za> |
2013-03-02 19:17:11 | mark.dickinson | link | issue17336 messages |
2013-03-02 19:17:11 | mark.dickinson | create | |
|