diff options
Diffstat (limited to 'numpy/core/src/scalarmathmodule.c.src')
-rw-r--r-- | numpy/core/src/scalarmathmodule.c.src | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src index 0ab062e92..00f7c6ed6 100644 --- a/numpy/core/src/scalarmathmodule.c.src +++ b/numpy/core/src/scalarmathmodule.c.src @@ -218,7 +218,14 @@ static void } #endif else { +#if @neg@ + @name@ tmp; + tmp = a / b; + if (((a > 0) != (b > 0)) && (a % b != 0)) tmp--; + *out = tmp; +#else *out = a / b; +#endif } } #define @name@_ctype_floor_divide @name@_ctype_divide |