From dfd604834b9bda7ba5cb8117a233ae51bcbc8c0f Mon Sep 17 00:00:00 2001 From: Lewis Gaul Date: Sun, 14 Nov 2021 18:04:47 +0000 Subject: [PATCH] Fix copy-paste error that results in incorrect results from exp64() --- lib/std/math/exp.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/math/exp.zig b/lib/std/math/exp.zig index 384c4efab4bdcbf4d40c4994c565a7a93dac42c3..71a492c7ad2939f5f070a5eb6d96e17c9dd8a2ae 100644 --- a/lib/std/math/exp.zig +++ b/lib/std/math/exp.zig @@ -146,7 +146,7 @@ fn exp64(x_: f64) f64 { var lo: f64 = undefined; // |x| > 0.5 * ln2 - if (hx > 0x3EB17218) { + if (hx > 0x3FD62E42) { // |x| >= 1.5 * ln2 if (hx > 0x3FF0A2B2) { k = @floatToInt(i32, invln2 * x + half[@intCast(usize, sign)]); -- 2.54.0