From 859b10d8bfcca3c4a30798b4522fd88ec6c66de6 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 15 Apr 2018 15:20:54 -0400 Subject: std.math.ln and std.math.exp use float strict mode closes #920 --- std/math/ln.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'std/math/ln.zig') diff --git a/std/math/ln.zig b/std/math/ln.zig index c349ed7c6f..d09494b998 100644 --- a/std/math/ln.zig +++ b/std/math/ln.zig @@ -89,6 +89,8 @@ pub fn ln_32(x_: f32) f32 { } pub fn ln_64(x_: f64) f64 { + @setFloatMode(this, @import("builtin").FloatMode.Strict); + const ln2_hi: f64 = 6.93147180369123816490e-01; const ln2_lo: f64 = 1.90821492927058770002e-10; const Lg1: f64 = 6.666666666666735130e-01; -- cgit v1.2.3