From 82a42b90a2c84d65756201021dd1e1587adc8282 Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Thu, 13 Jun 2019 10:06:17 -0700 Subject: [PATCH] Fix FMA_NATIVE constant As pointed out be @StefanKarpinski in https://github.com/JuliaLang/julia/pull/31922#issuecomment-501791271 --- base/special/log.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/special/log.jl b/base/special/log.jl index c9aafd3d08224..ef578edb56795 100644 --- a/base/special/log.jl +++ b/base/special/log.jl @@ -141,7 +141,7 @@ const t_log_Float32 = (0.0,0.007782140442054949,0.015504186535965254,0.023167059 # determine if hardware FMA is available # should probably check with LLVM, see #9855. -const FMA_NATIVE = muladd(nextfloat(1.0),nextfloat(1.0),-nextfloat(1.0,2)) == -4.930380657631324e-32 +const FMA_NATIVE = muladd(nextfloat(1.0),nextfloat(1.0),-nextfloat(1.0,2)) != 0 # truncate lower order bits (up to 26) # ideally, this should be able to use ANDPD instructions, see #9868.