We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
n
r
1 parent 00035b5 commit 666d26fCopy full SHA for 666d26f
library/core/src/num/int_macros.rs
@@ -2481,9 +2481,8 @@ macro_rules! int_impl {
2481
2482
// Optimization for 128 bit wide integers.
2483
if Self::BITS == 128 {
2484
- let b = Self::ilog2(self) / (Self::ilog2(base) + 1);
2485
- n += b;
2486
- r *= base.pow(b);
+ n = self.ilog2() / (base.ilog2() + 1);
+ r = base.pow(n);
2487
}
2488
2489
while r <= self / base {
library/core/src/num/uint_macros.rs
@@ -814,9 +814,8 @@ macro_rules! uint_impl {
814
815
816
817
818
819
820
821
822
0 commit comments