libquadmath: Fix up libquadmath/math/sqrtq.c compilation in some powerpc* configurati...
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ieee / 20010114-2.c
blobe5ab9485ffe02a0e230160cbfa12e8bd286473d2
1 extern void exit (int);
2 extern void abort (void);
4 float
5 rintf (float x)
7 static const float TWO23 = 8388608.0;
9 if (__builtin_fabs (x) < TWO23)
11 if (x > 0.0)
13 x += TWO23;
14 x -= TWO23;
16 else if (x < 0.0)
18 x = TWO23 - x;
19 x = -(x - TWO23);
23 return x;
26 int main (void)
28 if (rintf (-1.5) != -2.0)
29 abort ();
30 exit (0);