diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-10-01 11:13:05 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-10-01 11:13:05 -0600 |
commit | 2bc213bb3a75069775bc2a6cbc43dc26e1664835 (patch) | |
tree | bfad455881bc02c81c414f122a32cc873eca48e8 /numpy/core | |
parent | e6dbcead884019bd2aee802f78c41f6a9c46cd61 (diff) | |
parent | 09bf9cc62d47bb7d0d738c70a0fbdb9ff2a13985 (diff) | |
download | numpy-2bc213bb3a75069775bc2a6cbc43dc26e1664835.tar.gz |
Merge pull request #6346 from ChristopherHogan/signbit_fix
BUG: Guarantee non-zero is one in arctan2
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/src/npymath/npy_math.c.src | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/npymath/npy_math.c.src b/numpy/core/src/npymath/npy_math.c.src index b7f28bb39..7f62810d5 100644 --- a/numpy/core/src/npymath/npy_math.c.src +++ b/numpy/core/src/npymath/npy_math.c.src @@ -130,7 +130,7 @@ double npy_atan2(double y, double x) return npy_atan(y); } - m = 2 * npy_signbit(x) + npy_signbit(y); + m = 2 * (npy_signbit((x)) != 0) + (npy_signbit((y)) != 0); if (y == 0.0) { switch(m) { case 0: |