]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pow-sqrt.x
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pow-sqrt.x
CommitLineData
b7dce216
KT
1
2extern void abort (void);
3
4
5__attribute__((noinline)) double
6real_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)
14volatile double arg;
15
16int
17main (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}