]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pow-sqrt.x
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pow-sqrt.x
1
2 extern void abort (void);
3
4
5 __attribute__((noinline)) double
6 real_pow (double x, double pow_exp)
7 {
8 return __builtin_pow (x, pow_exp);
9 }
10
11 #define EPS (0.000000000000000000001)
12
13 #define SYNTH_POW(X, Y) __builtin_pow (X, Y)
14 volatile double arg;
15
16 int
17 main (void)
18 {
19 double i_arg = 0.1;
20
21 for (arg = i_arg; arg < 100.0; arg += 1.0)
22 {
23 double synth_res = SYNTH_POW (arg, EXPN);
24 double real_res = real_pow (arg, EXPN);
25
26 if (__builtin_abs (SYNTH_POW (arg, EXPN) - real_pow (arg, EXPN)) > EPS)
27 abort ();
28 }
29 return 0;
30 }