Fastmath error?

v1.6.1, when --math-mode=fast:

julia> f() = exp(1.0);

julia> f() - exp(1.0)
0.002427216033242807

which is obviously wrong. It’s wrong even in fastmath mode!

while when --math-mode=ieee, no problem:

julia> f() = exp(1.0);

julia> f() - exp(1.0)
0.0
1 Like

There was this discussion just now: What's going on with exp() and --math-mode=fast? - #24 by Elrod

I think the general gist is --math-mode=fast is broken, don’t use it.

2 Likes

thank you