hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 67690e797d4a78f4636f60ea18811ca4f931b1d6
parent b76e834c19d10ce7ecc14e5eccbbeef0e7de782b
Author: Carlos Une <une@fastmail.fm>
Date:   Thu,  9 Feb 2023 23:31:41 -0300

math: fix order of operation

Signed-off-by: Carlos Une <une@fastmail.fm>

Diffstat:
Mmath/complex/complex.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/math/complex/complex.ha b/math/complex/complex.ha @@ -472,7 +472,7 @@ fn reducePi(x: f64) f64 = { const mask: u64 = 0x7FF; const shift: u64 = 64 - 11 - 1; const bias: u64 = 1023; - const fracMask: u64 = 1u64 << shift - 1; + const fracMask: u64 = (1u64 << shift) - 1; // Extract out the integer and exponent such that, // x = ix * 2 ** exp.