-
Notifications
You must be signed in to change notification settings - Fork 214
deprecate mp_tc_(and|or|xor) in favor of mp_(and|or|xor) #279
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
Conversation
czurnieden
left a comment
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 would have used the old names but that's more a matter of taste, so…)
Please update the documentation, too.
Otherwise too many complains/feature requests of the form "And where is/can you implement mp_xor?" will come in.
The mp_complement has a different naming scheme, rename it to mp_tc_complement?
|
@czurnieden we could also deprecate mp_tc_x in favor of mp_x with changed behavior for negative mp_ints. I think that would be ok since no one uses mp_x on negative numbers. |
|
@czurnieden I changed the PR here - all bitwise functions are called mp_bit_x now. I think the names are much nicer like this. Also |
bcc3d5a to
4257f42
Compare
|
I also ask myself if there's even one user who depends on the old functions' behavior of negative numbers... I can't imagine as that was pretty useless, so I'd say we should use the old names! |
|
Ok good! I asked myself the same. I will change everything to the old names then. No unnecessary bit in the name. And I must say tc is also pretty ugly and I am a bit sorry for introducing it... |
* same behavior for positive numbers * generalisation for negative numbers, treating them as two complement * improve algorithm, iterate once over the digits, manually perform two complement * simplify mp_add_d, mp_sub_d * functions are safe in case of a==c or b==c * renamed mp_tc_div_2d to mp_signed_rsh (signed right shift)
b4db9a8 to
1af0de1
Compare
deprecate mp_tc_(and|or|xor) in favor of mp_(and|or|xor)