pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/58ceecfe5ac0ad436d556b589870dd2df62731c0

Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wro… · python/cpython@58ceecf · GitHub
Skip to content

Commit 58ceecf

Browse files
committed
Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results.
1 parent 7ed4294 commit 58ceecf

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ Core and Builtins
4949
Library
5050
-------
5151

52+
- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
53+
gcc.
54+
5255
- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension.
5356

5457
- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by

Modules/cmathmodule.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,13 @@ cmath_rect(PyObject *self, PyObject *args)
10061006
else
10071007
errno = 0;
10081008
}
1009+
else if (phi == 0.0) {
1010+
/* Workaround for buggy results with phi=-0.0 on OS X 10.8. See
1011+
bugs.python.org/issue18513. */
1012+
z.real = r;
1013+
z.imag = r * phi;
1014+
errno = 0;
1015+
}
10091016
else {
10101017
z.real = r * cos(phi);
10111018
z.imag = r * sin(phi);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy