search for: saverm

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

Did you mean: saver
2020 Jan 18
2
Combining fast math flags with constrained intrinsics
...-=-=-=-=-=-= double doSomethingVague(double X, double Y, double Z) { // Some operation that doesn't need to be precise. if (X/Y > SomeThreshold) return doSomethingPrecise(X, Y); else return Z; } #pragma STDC FENV_ACCESS ON double doSomethingPrecise(double X, double Y) { int SaveRM = fegetround(); fesetround(FE_DOWNWARD); feclearexcept(FE_ALL_EXCEPT); double Temp = X * Y + Z; if (fetestexcept(FE_ALL_EXCEPT)) std::cerr << "Something happened.\n"; fesetround(SaveRM); return Temp; } -=-=-=-=-=-=-=-= Now suppose I compile that with "-O2 -ffp...