View Single Post
Old 03-13-2023, 02:03 PM   #1410
jbjb
Somewhat clueless
jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.jbjb ought to be getting tired of karma fortunes by now.
 
Posts: 772
Karma: 9999999
Join Date: Nov 2008
Location: UK
Device: Kindle Oasis
Quote:
Originally Posted by j.p.s View Post
Reordering can be mathematically equivalent but still give significantly different computed results, especially if large and small quantities are present in the same expression.
Under the "as-if" rule, reordering shouldn't affect the computed results (so long as there's no undefined behaviour, such as signed overflow, going on). Some compilers have options to enable unsafe optimisations which might affect things if you're e.g. operating at the limits of floating point precision, so rounding errors mount up, and some may even default to those being turned on, but they must have a way of turning them off or they're not conforming.
jbjb is offline   Reply With Quote