-
Notifications
You must be signed in to change notification settings - Fork 143
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
fix(integer): is_neg/sub/add possible #581
Conversation
@slab-ci cpu_fast_test |
a99f3fc
to
651f5dc
Compare
@slab-ci cpu_fast_test |
@slab-ci cpu_integer_test |
651f5dc
to
9430a17
Compare
@slab-ci cpu_fast_test |
9430a17
to
9f12974
Compare
@slab-ci cpu_fast_test |
The way we did the is_neg/add/sub possible at the integer level was incorrect in two ways. 1) We simply called the is_neg/add/sub_possible from the shortint impl on each block as if the were independant. However that is not the case, and to the check did not reflect actual computation. 2) We checked that we did not go beyond max degree on each block, However, a more correct approach would be to check that adding the potential carry from preceding block would not exceeding the current block max capacity.
9f12974
to
4341b18
Compare
@slab-ci cpu_fast_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go, thanks !
Pull Request has been approved 🎉 |
The way we did the is_neg/add/sub possible at the integer level was incorrect in two ways.
We simply called the is_neg/add/sub_possible from
the shortint impl on each block as if the were independant.
However that is not the case, and to the check did not reflect
actual computation.
We checked that we did not go beyond max degree on each block,
However, a more correct approach would be to check that adding
the potential carry from preceding block would not exceeding the
current block max capacity.
Fixes asserts for is_sub_possible being triggered in #536