-
Notifications
You must be signed in to change notification settings - Fork 144
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
chore: make more add/sub test use variable num_blocks #1717
base: main
Are you sure you want to change the base?
Conversation
7209633
to
07a8653
Compare
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.
Two small questions/remarks
if modulus == 1 { | ||
// Basically have one bit the sign bit can't really test | ||
// Basically have one bit, the sign bit can't really test | ||
continue; | ||
} |
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.
this is even worse than that, we can't represent any value with such a modulus, the intended (?) test would be modulus <= 2 ?
Same everywhere
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.
Hum its not really clear when reading, but, the modulus
here is actually the half_modulus
since its obtained by doing modulus / 2
, so its the modulus ignoring the sign bit
So if half_modulus == 1
then it means we have one bit which is the sign bit, as the 'value' bits only allow represent values with half_modulus == 1 so nothing
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.
ok got it, so the naming is a bit misleading
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.
are we able to test the minimum value then for a signed integer ?
i.e.
-2^b for some b ? as using the modulus on the abs value would limit us to -2^b + 1
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.
I will update the naming
tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs
Outdated
Show resolved
Hide resolved
07a8653
to
4b2c0ae
Compare
No description provided.