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.
-
-
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 -
The spec clearly says it must NOT do that.
1 reply 0 retweets 1 like -
So you’re saying the spec mandates 80-bit internal precision and other machines are wrong?
3 replies 0 retweets 0 likes -
The spec mandates you can only impose a double-round when you explicitly store to double. If your machine doesn't double round ever, fine.
1 reply 0 retweets 1 like -
Okay, if double-rounding is incorrect here, then x87 is actually incapable of IEEE double math. Oops
3 replies 0 retweets 3 likes -
Yeah, big oops by Intel. They implemented the precision control register incorrectly - exponent is all always 15bit.
2 replies 0 retweets 1 like
Yields excess precision in subnormal results and missed overflows (failure to saturate).
-
-
Replying to @RichFelker @FioraAeterna and
could always have the fun of a compiler that doesn't "really" use double apart for when dealing with pointers/...
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.