Skip to content

Commit 45aec94

Browse files
author
Jorge Aparicio
committed
use wrapping_add in muldi4
1 parent f3eb08a commit 45aec94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mul.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ macro_rules! mul {
1919
low += (t & lower_mask) << half_bits;
2020
high += t >> half_bits;
2121
high += (a.low() >> half_bits) * (b.low() >> half_bits);
22-
high += a.high().wrapping_mul(b.low()) + a.low().wrapping_mul(b.high());
22+
high = high.wrapping_add(a.high().wrapping_mul(b.low()).wrapping_add(a.low().wrapping_mul(b.high())));
2323
<$ty>::from_parts(low, high)
2424
}
2525
}

0 commit comments

Comments
 (0)