diff options
| author | Eric Wieser <wieser.eric@gmail.com> | 2017-09-22 20:48:57 -0700 |
|---|---|---|
| committer | Eric Wieser <wieser.eric@gmail.com> | 2017-09-22 20:48:57 -0700 |
| commit | a82a67ba3f2f7ce701c871e1cd30d5b3cb51073b (patch) | |
| tree | 01ff091ce7d355ef4addc106490e7d57ea1e0fbb /numpy/core/src/npymath | |
| parent | 8899616091dcedca6f05adbdd7a38f44cc9d01c2 (diff) | |
| download | numpy-a82a67ba3f2f7ce701c871e1cd30d5b3cb51073b.tar.gz | |
BUG: Fix loss of precision for large values in long double divmod
Diffstat (limited to 'numpy/core/src/npymath')
| -rw-r--r-- | numpy/core/src/npymath/npy_math_internal.h.src | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/npymath/npy_math_internal.h.src b/numpy/core/src/npymath/npy_math_internal.h.src index 44d6f915f..093e51b2d 100644 --- a/numpy/core/src/npymath/npy_math_internal.h.src +++ b/numpy/core/src/npymath/npy_math_internal.h.src @@ -659,7 +659,7 @@ npy_divmod@c@(@type@ a, @type@ b, @type@ *modulus) /* snap quotient to nearest integral value */ if (div) { - floordiv = npy_floor(div); + floordiv = npy_floor@c@(div); if (div - floordiv > 0.5@c@) floordiv += 1.0@c@; } |
