8000 BUG: Unexpected result in uint8 division on x86 · Issue #19045 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Unexpected result in uint8 division on x86 #19045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
seiko2plus opened this issue May 19, 2021 · 0 comments · Fixed by #19046
Closed

BUG: Unexpected result in uint8 division on x86 #19045

seiko2plus opened this issue May 19, 2021 · 0 comments · Fixed by #19046
Labels
00 - Bug 06 - Regression component: SIMD Issues in SIMD (fast instruction sets) code or machinery

Comments

@seiko2plus
Copy link
Member

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:

main, after #18075. related to #18178

@seiko2plus seiko2plus added 00 - Bug component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels May 19, 2021
@seberg seberg added this to the 1.21.0 release milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 06 - Regression component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0