fn computePow5(i: u32) [4]u64 i: u32642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657 fn computePow5(i: u32) [4]u64 {
const base = i / FLOAT128_POW5_TABLE_SIZE;
const base2 = base * FLOAT128_POW5_TABLE_SIZE;
const mul = &FLOAT128_POW5_SPLIT[base];
if (i == base2) {
return mul.*;
} else {
const offset = i - base2;
const m = &FLOAT128_POW5_TABLE[offset];
const delta = pow5Bits(i) - pow5Bits(base2);
const shift: u6 = @intCast(2 * (i % 32));
const corr: u32 = @intCast((FLOAT128_POW5_ERRORS[i / 32] >> shift) & 3);
return mul_128_256_shift(m, mul, delta, corr);
}
}