1 /* Copyright (C) 2003 Free Software Foundation.
3 Verify that built-in math function constant folding of constant
4 arguments is correctly performed by the by the compiler.
6 Written by Roger Sayle, 30th March 2003. */
9 /* { dg-options "-O2 -ffast-math" } */
11 extern double pow (double, double);
12 extern float powf (float, float);
13 extern long double powl (long double, long double);
14 extern double tan (double);
15 extern float tanf (float);
16 extern long double tanl (long double);
17 extern double atan (double);
18 extern float atanf (float);
19 extern long double atanl (long double);
21 extern void link_error(void);
25 if (pow (x
, 1.0) != x
)
27 if (tan (atan (x
)) != x
)
33 if (powf (x
, 1.0f
) != x
)
35 if (tanf (atanf (x
)) != x
)
39 void testl(long double x
)
41 if (powl (x
, 1.0l) != x
)
43 if (tanl (atanl (x
)) != x
)