-
Notifications
You must be signed in to change notification settings - Fork 505
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
bug: Saturation Arithmetic is incorrect with negative signed integers #6462
Closed
Labels
bug
Something isn't working
Comments
orizi
added a commit
that referenced
this issue
Oct 7, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 7, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 7, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 8, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 10, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 10, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 10, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
orizi
added a commit
that referenced
this issue
Oct 10, 2024
Fixing issue with returning the proper saturating value on `Saturating{Add,Sub}`. Fixing #6462. commit-id:861630ee
This was
linked to
pull requests
Oct 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Cairo version:
2.8.4
Current behavior:
would give -128
Expected behavior:
Above should give 127
Steps to reproduce:
Above using the
SaturatingSub
TraitRelated code:
https://github.com/starkware-libs/cairo/blob/main/corelib/src/num/traits/ops/saturating.cairo#L22-L58
https://github.com/starkware-libs/cairo/blob/main/corelib/src/integer.cairo#L2965-L2988
Other information:
The text was updated successfully, but these errors were encountered: