commit ccdb80d9725ad983860bfc5402a6f513088cba7a
parent 4c2612fff30496f374ffa146a7b944582728e1ed
Author: Sebastian <sebastian@sebsite.pw>
Date: Sun, 1 Dec 2024 20:25:46 -0500
math: use tuple unpacking in trig_reduce
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/math/trig.ha b/math/trig.ha
@@ -168,11 +168,8 @@ fn trig_reduce(x: f64) (u64, f64) = {
(MPI4[digit + 3] >> (64 - bitshift));
// Multiply mantissa by the digits and extract the upper two digits
// (hi, lo).
- const z2 = mulu64(z2, ix);
- const z2hi = z2.0;
- const z1 = mulu64(z1, ix);
- const z1hi = z1.0;
- const z1lo = z1.1;
+ const (z2hi, _) = mulu64(z2, ix);
+ const (z1hi, z1lo) = mulu64(z1, ix);
const z0lo = z0 * ix;
const lo = z1lo + z2hi;
let hi = z0lo + z1hi;