Compiler may optimize out call to cbrt. Change test to prevent that.
Otherwise, the test does not exercise a desired codepath for cbrt, and it
prints precalculated value.
volatile float result __attribute__((unused)) = 123.0f / zero;
}
+volatile double cube = 27.0;
+
int main () {
/* Testing lrint. */
fesetround(FE_UPWARD); // lrint/lrintf/lrintl obey the rounding mode.
printf("tgamma(5.0): %lf\n", tgamma(5.0));
/* Test cbrt. */
- printf("cbrt(27.0): %lf\n", cbrt(27.0));
+ printf("cbrt(27.0): %lf\n", cbrt(cube));
/* Test dividing by zero. */
// Clearing clears.