This is why it's so important for compilers to comply strictly to spec & not do foolish transformations that change results.
-
-
this one's actually worse though: the compiler didn't even do any transformations
1 reply 0 retweets 1 like -
Replying to @FioraAeterna @RichFelker and
rather, x87 keeps extra internal precision between ops, and you *can't turn it off*
5 replies 0 retweets 2 likes -
There's a spec on this in C around FLT_EVAL_METHOD and it's 100% deterministic if implemented correctly. GCC does it wrong in -std=gnuXX.
1 reply 0 retweets 2 likes -
yes. what i mean is that doing the naive compilation will not match the spec; you have to do extra steps to match it
1 reply 0 retweets 0 likes -
Erm, if I understand it right you just implement double+double=double_t, flush those to stack, and only round when storing to double?
1 reply 0 retweets 0 likes -
Conforming compiler has to spill doubles as double_t (long double for x86), convert to double only via explicit cast or assignment.
3 replies 0 retweets 1 like -
Eh? Opposite problem; it has to round to double after each op.
2 replies 0 retweets 0 likes -
Replying to @FioraAeterna @RichFelker and
The bug can occur even if you never spill once.
1 reply 0 retweets 0 likes -
-float-store is a buggy workaround for old gcc behavior that made stuff deterministic but worse/wrong.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.