Fix i256::MAX

This commit is contained in:
Tobias Decking
2025-05-08 15:00:59 +02:00
committed by Trevor Gross
parent 65663b538f
commit d16c82dba1
2 changed files with 2 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ impl MinInt for i256 {
const ZERO: Self = Self([0u64; 4]);
const ONE: Self = Self([1, 0, 0, 0]);
const MIN: Self = Self([0, 0, 0, 1 << 63]);
const MAX: Self = Self([u64::MAX, u64::MAX, u64::MAX, u64::MAX << 1]);
const MAX: Self = Self([u64::MAX, u64::MAX, u64::MAX, u64::MAX >> 1]);
}
macro_rules! impl_common {

View File

@@ -83,7 +83,7 @@ impl MinInt for i256 {
};
const MAX: Self = Self {
lo: u128::MAX,
hi: u128::MAX << 1,
hi: u128::MAX >> 1,
};
}