diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-09-23 10:01:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-23 10:01:21 -0500 |
commit | e413b8f2568dcb6912f107bd68caaa27a85fc2da (patch) | |
tree | 33b14950bea21874d68e6953e8c4762cf959f6c6 /numpy | |
parent | ede8c80f52e040e6481bce43237c708954b7b91f (diff) | |
parent | a82a67ba3f2f7ce701c871e1cd30d5b3cb51073b (diff) | |
download | numpy-e413b8f2568dcb6912f107bd68caaa27a85fc2da.tar.gz |
Merge pull request #9749 from eric-wieser/divmod-longdouble
BUG: Fix loss of precision for large values in long double divmod
Diffstat (limited to 'numpy')
-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@; } |