This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients eric.smith, ezio.melotti, mark.dickinson, mjacob, skrah
Date 2013-03-02.19:17:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362251831.58.0.106615041141.issue17336@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2013-03-02 19:17:11mark.dickinsonsetrecipients: + mark.dickinson, eric.smith, ezio.melotti, skrah, mjacob
2013-03-02 19:17:11mark.dickinsonsetmessageid: <1362251831.58.0.106615041141.issue17336@psf.upfronthosting.co.za>
2013-03-02 19:17:11mark.dickinsonlinkissue17336 messages
2013-03-02 19:17:11mark.dickinsoncreate