Rollup merge of #152770 - RalfJung:carryless-mul-base, r=scottmcm

carryless_mul: mention the base

Arithmetic operations do not typically care about the base that is used to represent numbers, but this one does. Mentioning that makes it easier to understand the operation, I think.

Cc @folkertdev
This commit is contained in:
Stuart Cook 2026-02-18 17:29:50 +11:00 committed by GitHub
commit c7db84b0a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -487,8 +487,8 @@ macro_rules! uint_impl {
/// Performs a carry-less multiplication, returning the lower bits.
///
/// This operation is similar to long multiplication, except that exclusive or is used
/// instead of addition. The implementation is equivalent to:
/// This operation is similar to long multiplication in base 2, except that exclusive or is
/// used instead of addition. The implementation is equivalent to:
///
/// ```no_run
#[doc = concat!("pub fn carryless_mul(lhs: ", stringify!($SelfT), ", rhs: ", stringify!($SelfT), ") -> ", stringify!($SelfT), "{")]