-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add widening_mul, group absolute value operations, reformat. #1
Conversation
@@ -31,13 +31,30 @@ impl<const LIMBS: usize> Int<LIMBS> { | |||
|
|||
(lo, hi, negate) | |||
} | |||
|
|||
/// Multiply `self` by `rhs`, returning a concatenated "wide" result. | |||
pub const fn widening_mul<const RHS_LIMBS: usize, const WIDE_LIMBS: usize>( |
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.
Now that we have widening_mul
, could be nice to implement Mul<Int<RHS_LIMBS>>
for Int<LIMBS>
similarly to Uint
. This was done by me at the time using macros, the idea was for the standard type to have Mul<Int128> for Int192
and such.
@lleoha thanks for adding this! It is a great addition 👌 Let's fine-tune the details in the conversations I started. |
@lleoha looks good! There are two remarks still open. Could you please fix these? Then I'll merge. Also, I've been so bold to commit a small code change :) |
sure, i'll update it today after business hours CEST. |
done @erik-3milabs |
@erik-3milabs
I also did some changes, please review and incorporate in yours if you will.
What I did is:
num_traits::signed
,