New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in representation of complex numbers(again) #41547
Comments
>>> -(1+0j)
(-1+-0j) I encountered this while I was calculating conjugate of Related bug One thing to note is that -(0j) can return 0j or -0j Confirmed on SuSE 9.1 & cygwin. |
Logged In: YES What you are seeing is negative zero (-0.0). It is distinct >>> -0.0
-0.0 On other machines you will see "0.0" instead. You can also try |
Logged In: YES Hi, Björn. Sorry, not to be clear about what my complaint is. I'm not My point is the signature of imaginary part. As you can see, If you test it with Python <= 2.3, you'll get (-1-0j) and I think |
Logged In: YES Martin, what's your take on this? The representation of '-(1+0j)' has changed since Revision 2.71 # original patch |
Logged In: YES What do you think about the patch attached? |
Logged In: YES The fix seems reasonable to me and it passed the test Please apply it. |
Logged In: YES Can anyone else review this patch before the new 2.4 gets |
Logged In: YES Reviewed and applied in Objects/complexobject.c r2.74, 2.72.2.2. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: