3 ms·
A nit: a lot of uses of multiplication only care about a result type as wide as the input type. For these uses of multiplication, two's complement signed multip
by anonymoushn 3y ago
A nit: a lot of uses of multiplication only care about a result type as wide as the input type. For these uses of multiplication, two's complement signed multiplication and reinterpreting the bits as unsigned then performing unsigned multiplication give the same result. When you start caring about i32 x i32 = i64 or i64 x i64 = i128 or bigint multiplies this stops being true because the bits you'd use to sign-extend the inputs can actually show up in the result.