remove wrong subtraction in dec div

This commit is contained in:
Yuki Omoto 2023-04-09 11:34:24 +09:00
parent f57085da05
commit 7ef166a11f
No known key found for this signature in database
GPG key ID: 9A7D6C91D5219717

View file

@ -693,10 +693,10 @@ fn div_u256_by_u128(numer: U256, denom: u128) U256 {
var s_lo: u128 = undefined;
if (s_u128 == 1) {
s_hi = math.maxInt(u128);
s_lo = math.maxInt(u128) - 2;
s_lo = math.maxInt(u128);
} else {
s_hi = 0;
s_lo = s_u128;
s_lo = 0;
}
var s = .{
.hi = s_hi,