From f8808edff479426a04685ac6f2b487376eaab65a Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Wed, 29 Aug 2018 17:38:46 -0700 Subject: [PATCH] simplify f64_min to equivilent value arm64 complains about the old value (I added a test) --- std/math/index.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/std/math/index.zig b/std/math/index.zig index e5fd0f3685..afc19a3805 100644 --- a/std/math/index.zig +++ b/std/math/index.zig @@ -8,7 +8,7 @@ pub const pi = 3.14159265358979323846264338327950288419716939937510; // float.h details pub const f64_true_min = 4.94065645841246544177e-324; -pub const f64_min = 2.22507385850720138309e-308; +pub const f64_min = 2.2250738585072014e-308; pub const f64_max = 1.79769313486231570815e+308; pub const f64_epsilon = 2.22044604925031308085e-16; pub const f64_toint = 1.0 / f64_epsilon; @@ -650,3 +650,9 @@ pub fn lossyCast(comptime T: type, value: var) T { else => @compileError("bad type"), } } + +test "math.f64_min" { + const f64_min_u64 = 0x0010000000000000; + const fmin: f64 = f64_min; + assert(@bitCast(u64, fmin) == f64_min_u64); +}