You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proposed bigint helper methods in core (rust-lang/rust#85532) use the following names:
carrying_add
borrowing_sub
carrying_mul
widening_mul
Perhaps it would be good to generally align names and semantics with those. Names like adc and sbb that are derived from CPU instructions are on the one hand nicely terse and on the other perhaps a bit unclear unless you're already familiar with the CPU instructions.
Notably carrying_mul and widening_mul return a double-width result as two instances of Self, which is what the latest prereleases of crypto-bigint define as split_mul.
So perhaps split_mul should be renamed to widening_mul, and the current widening_mul should be renamed to something else.
There are two different conventions for widening operations used in this crate:
widening_*
as used byWideningMul::widening_mul
and inherent methods*_wide
as used bysquare_wide
,rem_wide
,overflowing_shl_*wide
Notably
square_wide
returns a "split" result, rather than widening the output, which is calledUint::split_mul
for multiplication.Should
square_wide
be renamed tosplit_square
for consistency withsplit_mul
? Or should they be renamed to something else?The text was updated successfully, but these errors were encountered: