1/* Copyright (C) 2004 Free Software Foundation.
2
3   Check that various built-in functions compile.
4
5   Written by Uros Bizjak, 13th February 2004.  */
6
7/* { dg-do compile } */
8/* { dg-options "-O2 -ffast-math" } */
9
10extern double exp10(double);
11extern double exp2(double);
12extern double pow10(double);
13extern double expm1(double);
14extern double ldexp(double, int);
15extern double scalb(double, double);
16extern double scalbn(double, int);
17extern double scalbln(double, long);
18extern double significand(double);
19extern float exp10f(float);
20extern float exp2f(float);
21extern float pow10f(float);
22extern float expm1f(float);
23extern float ldexpf(float, int);
24extern float scalbf(float, float);
25extern float scalbnf(float, int);
26extern float scalblnf(float, long);
27extern float significandf(float);
28extern long double exp10l(long double);
29extern long double exp2l(long double);
30extern long double pow10l(long double);
31extern long double expm1l(long double);
32extern long double ldexpl(long double, int);
33extern long double scalbl(long double, long double);
34extern long double scalbnl(long double, int);
35extern long double scalblnl(long double, long);
36extern long double significandl(long double);
37
38
39double test1(double x)
40{
41  return exp10(x);
42}
43
44double test2(double x)
45{
46  return exp2(x);
47}
48
49double test3(double x)
50{
51  return pow10(x);
52}
53
54double test4(double x)
55{
56  return expm1(x);
57}
58
59double test5(double x, int exp)
60{
61  return ldexp(x, exp);
62}
63
64double test6(double x, double exp)
65{
66  return scalb(x, exp);
67}
68
69double test7(double x, int exp)
70{
71  return scalbn(x, exp);
72}
73
74double test8(double x, long exp)
75{
76  return scalbln(x, exp);
77}
78
79double test9(double x)
80{
81  return significand(x);
82}
83
84float test1f(float x)
85{
86  return exp10f(x);
87}
88
89float test2f(float x)
90{
91  return exp2f(x);
92}
93
94float test3f(float x)
95{
96  return pow10f(x);
97}
98
99float test4f(float x)
100{
101  return expm1f(x);
102}
103
104float test5f(float x, int exp)
105{
106  return ldexpf(x, exp);
107}
108
109float test6f(float x, float exp)
110{
111  return scalbf(x, exp);
112}
113
114float test7f(float x, int exp)
115{
116  return scalbnf(x, exp);
117}
118
119float test8f(float x, long exp)
120{
121  return scalblnf(x, exp);
122}
123
124float test9f(float x)
125{
126  return significandf(x);
127}
128
129long double test1l(long double x)
130{
131  return exp10l(x);
132}
133
134long double test2l(long double x)
135{
136  return exp2l(x);
137}
138
139long double test3l(long double x)
140{
141  return pow10l(x);
142}
143
144long double test4l(long double x)
145{
146  return expm1l(x);
147}
148
149long double test5l(long double x, int exp)
150{
151  return ldexpl(x, exp);
152}
153
154long double test6l(long double x, long double exp)
155{
156  return scalbl(x, exp);
157}
158
159long double test7l(long double x, int exp)
160{
161  return scalbnl(x, exp);
162}
163
164long double test8l(long double x, long exp)
165{
166  return scalblnl(x, exp);
167}
168
169long double test9l(long double x)
170{
171  return significandl(x);
172}
173