-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
BUG: Unexpected result in uint8 division on x86 #19045
Copy link
Copy link
Closed
Labels
00 - Bug06 - Regressioncomponent: SIMDIssues in SIMD (fast instruction sets) code or machineryIssues in SIMD (fast instruction sets) code or machinery
Milestone
Description
The bug can occur in special cases e.g. when the divisor is scalar and equal to 9 or 13 and the dividend is array contains consecutive duplicate values of 233.
Reproducing code example:
>>> import numpy as np
>>> a = np.full(64, 233, dtype=np.uint8)
>>> a // 9
array([25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25,
26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26,
25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25,
26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26, 25, 26], dtype=uint8)NumPy/Python version information:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
00 - Bug06 - Regressioncomponent: SIMDIssues in SIMD (fast instruction sets) code or machineryIssues in SIMD (fast instruction sets) code or machinery