[MLton-user] timing anomoly
Florian Weimer
fw at deneb.enyo.de
Wed Dec 5 13:55:05 PST 2007
* Matthew Fluet:
> FP arithemetic is not associative, so it is not really justified (or
> at least numerically accurate) to reassociate the computation for
> constant folding. I could see constant folding the idividual
> negations and multiplications, but the additions really ought not be.
In this case, the folding GCC performs increases accuracy, which is
permitted according to the floating point model implement by GCC (and,
presumably, what's described in the relevant appendix of C99). Without
-ffast-math, GCC is supposed to not apply any transformation which
reduces accuracy.
More information about the MLton-user
mailing list