mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Issue #18513: Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results.
This commit is contained in:
parent
7ed4294d7f
commit
58ceecfe5a
2 changed files with 10 additions and 0 deletions
|
|
@ -49,6 +49,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
|
||||||
|
gcc.
|
||||||
|
|
||||||
- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension.
|
- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension.
|
||||||
|
|
||||||
- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
|
- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
|
||||||
|
|
|
||||||
|
|
@ -1006,6 +1006,13 @@ cmath_rect(PyObject *self, PyObject *args)
|
||||||
else
|
else
|
||||||
errno = 0;
|
errno = 0;
|
||||||
}
|
}
|
||||||
|
else if (phi == 0.0) {
|
||||||
|
/* Workaround for buggy results with phi=-0.0 on OS X 10.8. See
|
||||||
|
bugs.python.org/issue18513. */
|
||||||
|
z.real = r;
|
||||||
|
z.imag = r * phi;
|
||||||
|
errno = 0;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
z.real = r * cos(phi);
|
z.real = r * cos(phi);
|
||||||
z.imag = r * sin(phi);
|
z.imag = r * sin(phi);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue