2 // { dg-do compile { target c++14 } }
4 // sincos and lgamma_r aren't available in -std=c++14,
5 // only in -std=gnu++14. Use __builtin_* in that case.
6 extern "C" void sincos (double, double *, double *);
7 extern "C" double frexp (double, int *);
8 extern "C" double modf (double, double *);
9 extern "C" double remquo (double, double, int *);
10 extern "C" double lgamma_r (double, int *);
17 __builtin_sincos (x, &y, &z);
26 __builtin_sincos (x, &y, &z);
61 f6 (double x, double y)
64 return remquo (x, y, &z);
68 f7 (double x, double y)
79 return __builtin_lgamma_r (x, &y);
86 __builtin_lgamma_r (x, &y);
90 static_assert (f0 (0.0) == 0.0, "");
91 static_assert (f1 (0.0) == 1.0, "");
92 static_assert (f2 (6.5) == 0.8125, "");
93 static_assert (f3 (6.5) == 3, "");
94 static_assert (f4 (-7.25) == -0.25, "");
95 static_assert (f5 (-7.25) == -7.0, "");
96 static_assert (f6 (3.0, 2.0) == -1.0, "");
97 static_assert (f7 (3.0, 2.0) == 2, "");
98 static_assert (f8 (0.75) >= 0.20 && f8 (0.75) <= 0.21, "");
99 static_assert (f8 (0.75) >= 0.20 && f8 (0.75) <= 0.21, "");
100 static_assert (f9 (0.75) == 1, "");