-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
complex constructor loses signs of zeros #45848
Comments
In Python2.5 and the current trunk, construction of a complex number from two floats >>> complex(-0., 0.).real # behaves as expected
-0.0
>>> complex(0., -0.).imag # loses sign of zero
0.0 There are situations where it's important to preserve the sign of zero (typically The attached patch changes the complex constructor so that if x and y are numeric There was some previous discussion of this on python-dev earlier this year. See http://mail.python.org/pipermail/python-dev/2007-January/070770.html |
Committed revision 59203. Anthony, is this OK to backport to 2.5.2? |
This is out of date for 2.5. Closing. |
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: