summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/common/simd/intdiv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/common/simd/intdiv.h b/numpy/core/src/common/simd/intdiv.h
index c787c7a7d..a7a461721 100644
--- a/numpy/core/src/common/simd/intdiv.h
+++ b/numpy/core/src/common/simd/intdiv.h
@@ -201,7 +201,7 @@ NPY_FINLINE npyv_u8x3 npyv_divisor_u8(npy_uint8 d)
default:
l = npyv__bitscan_revnz_u32(d - 1) + 1; // ceil(log2(d))
l2 = (npy_uint8)(1 << l); // 2^l, overflow to 0 if l = 8
- m = ((l2 - d) << 8) / d + 1; // multiplier
+ m = ((npy_uint16)((l2 - d) << 8)) / d + 1; // multiplier
sh1 = 1; sh2 = l - 1; // shift counts
}
npyv_u8x3 divisor;