@fastmath macro accuracy

Note that simply rearranging floating point arithmetic can be enough to yield any value whatsoever. Further, there isn’t a robust metric for what is acceptable for @fastmath (or C’s -ffast-math). The tradeoffs are rather arbitrary and dependent upon hardware capabilities.

I think the macro should be split up and killed — it’s one thing to sometimes return NaN, it’s another to reorder, and it’s yet another to arbitrarily change accuracy.

4 Likes