]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr46728-9.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr46728-9.c
1 /* { dg-do run } */
2 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm" } */
3
4 #include <math.h>
5
6 extern void abort (void);
7
8 #define NVALS 6
9
10 static double
11 convert_it (double x)
12 {
13 return pow (x, 0.5);
14 }
15
16 int
17 main (int argc, char *argv[])
18 {
19 double values[NVALS] = { 3.0, 1.95, 2.227, 4.0, 256.0, .0008797 };
20 double PREC = 0.999999;
21 unsigned i;
22
23 for (i = 0; i < NVALS; i++)
24 if (fabs (convert_it (values[i]) / sqrt (values[i])) < PREC)
25 abort ();
26
27 return 0;
28 }
29