1 /* Copyright (C) 2004 Free Software Foundation.
3 Check that rint, rintf, rintl, lrint, lrintf, lrintl,
4 llrint, llrintf, llrintl, floor, floorf, floorl,
5 ceil, ceilf, ceill, trunc, truncf, truncl,
6 nearbyint, nearbyintf and nearbyintl
7 built-in functions compile.
9 Written by Uros Bizjak, 25th Aug 2004. */
11 /* { dg-do compile } */
12 /* { dg-options "-O2 -ffast-math" } */
14 extern double rint(double);
15 extern long int lrint(double);
16 extern long long int llrint(double);
17 extern double floor(double);
18 extern double ceil(double);
19 extern double trunc(double);
20 extern double nearbyint(double);
22 extern float rintf(float);
23 extern long int lrintf(float);
24 extern long long int llrintf(float);
25 extern float floorf(float);
26 extern float ceilf(float);
27 extern float truncf(float);
28 extern float nearbyintf(float);
30 extern long double rintl(long double);
31 extern long int lrintl(long double);
32 extern long long int llrintl(long double);
33 extern long double floorl(long double);
34 extern long double ceill(long double);
35 extern long double truncl(long double);
36 extern long double nearbyintl(long double);
39 double test1(double x
)
44 long int test11(double x
)
49 long long int test12(double x
)
54 double test2(double x
)
59 double test3(double x
)
64 double test4(double x
)
69 double test5(double x
)
79 long int test11f(float x
)
84 long long int test12f(float x
)
104 float test5f(float x
)
106 return nearbyintf(x
);
109 long double test1l(long double x
)
114 long int test11l(long double x
)
119 long long int test12l(long double x
)
124 long double test2l(long double x
)
129 long double test3l(long double x
)
134 long double test4l(long double x
)
139 long double test5l(long double x
)
141 return nearbyintl(x
);