search for: sexact

Displaying 1 result from an estimated 1 matches for "sexact".

Did you mean: exact
2016 Aug 18
5
fenv.h vs the optimizer
...;, rint(0.5)); fesetround(FE_UPWARD); printf("foo upward: %f\n", rint(0.5)); } If compiled with optimization, only one call to rint() is made and the result is reused. void bar(double a, double b) { feclearexcept(FE_INEXACT); a / b; printf("bar %f / %f is %sexact\n", a, b, fetestexcept(FE_INEXACT)? "in": ""); } The compiler omits the divide as the result is unused. And so on. Presumably this has never worked? And perhaps LLVM is no worse than other compilers in this regard? Is there any appetite to fix it? What kind of chang...