sigaltstck: add missing include
[libc-test.git] / src / api / math.c
blob5d6d3f02f9977c3fa1207466f4a6d0a076d77c2d
1 #include <math.h>
2 #define T(t) (t*)0;
3 #define C(n) switch(n){case n:;}
4 #define I(t,e) {t x[sizeof(t)==sizeof(e)] = {e};}
5 #define D(n) {double d = n;}
6 static void f()
8 T(float_t)
9 T(double_t)
10 I(int,fpclassify(.0))
11 I(int,isfinite(.0))
12 I(int,isgreater(.0,.0))
13 I(int,isgreaterequal(.0,.0))
14 I(int,isinf(.0))
15 I(int,isless(.0,.0))
16 I(int,islessequal(.0,.0))
17 I(int,islessgreater(.0,.0))
18 I(int,isnan(.0))
19 I(int,isnormal(.0))
20 I(int,isunordered(.0,.0))
21 I(int,signbit(.0))
22 #ifdef _XOPEN_SOURCE
23 I(int,signgam)
24 D(M_E)
25 D(M_LOG2E)
26 D(M_LOG10E)
27 D(M_LN2)
28 D(M_LN10)
29 D(M_PI)
30 D(M_PI_2)
31 D(M_PI_4)
32 D(M_1_PI)
33 D(M_2_PI)
34 D(M_2_SQRTPI)
35 D(M_SQRT2)
36 D(M_SQRT1_2)
37 D(MAXFLOAT)
38 #endif
39 D(HUGE_VAL)
40 D(HUGE_VALF)
41 D(HUGE_VALL)
42 D(INFINITY)
43 D(NAN)
44 C(FP_INFINITE)
45 C(FP_NAN)
46 C(FP_NORMAL)
47 C(FP_SUBNORMAL)
48 C(FP_ZERO)
49 C(FP_ILOGB0)
50 C(FP_ILOGBNAN)
51 C(MATH_ERRNO)
52 C(MATH_ERREXCEPT)
53 C(math_errhandling)
54 {double(*p)(double) = acos;}
55 {float(*p)(float) = acosf;}
56 {double(*p)(double) = acosh;}
57 {float(*p)(float) = acoshf;}
58 {long double(*p)(long double) = acoshl;}
59 {long double(*p)(long double) = acosl;}
60 {double(*p)(double) = asin;}
61 {float(*p)(float) = asinf;}
62 {double(*p)(double) = asinh;}
63 {float(*p)(float) = asinhf;}
64 {long double(*p)(long double) = asinhl;}
65 {long double(*p)(long double) = asinl;}
66 {double(*p)(double) = atan;}
67 {double(*p)(double,double) = atan2;}
68 {float(*p)(float,float) = atan2f;}
69 {long double(*p)(long double,long double) = atan2l;}
70 {float(*p)(float) = atanf;}
71 {double(*p)(double) = atanh;}
72 {float(*p)(float) = atanhf;}
73 {long double(*p)(long double) = atanhl;}
74 {long double(*p)(long double) = atanl;}
75 {double(*p)(double) = cbrt;}
76 {float(*p)(float) = cbrtf;}
77 {long double(*p)(long double) = cbrtl;}
78 {double(*p)(double) = ceil;}
79 {float(*p)(float) = ceilf;}
80 {long double(*p)(long double) = ceill;}
81 {double(*p)(double,double) = copysign;}
82 {float(*p)(float,float) = copysignf;}
83 {long double(*p)(long double,long double) = copysignl;}
84 {double(*p)(double) = cos;}
85 {float(*p)(float) = cosf;}
86 {double(*p)(double) = cosh;}
87 {float(*p)(float) = coshf;}
88 {long double(*p)(long double) = coshl;}
89 {long double(*p)(long double) = cosl;}
90 {double(*p)(double) = erf;}
91 {double(*p)(double) = erfc;}
92 {float(*p)(float) = erfcf;}
93 {long double(*p)(long double) = erfcl;}
94 {float(*p)(float) = erff;}
95 {long double(*p)(long double) = erfl;}
96 {double(*p)(double) = exp;}
97 {double(*p)(double) = exp2;}
98 {float(*p)(float) = exp2f;}
99 {long double(*p)(long double) = exp2l;}
100 {float(*p)(float) = expf;}
101 {long double(*p)(long double) = expl;}
102 {double(*p)(double) = expm1;}
103 {float(*p)(float) = expm1f;}
104 {long double(*p)(long double) = expm1l;}
105 {double(*p)(double) = fabs;}
106 {float(*p)(float) = fabsf;}
107 {long double(*p)(long double) = fabsl;}
108 {double(*p)(double,double) = fdim;}
109 {float(*p)(float,float) = fdimf;}
110 {long double(*p)(long double,long double) = fdiml;}
111 {double(*p)(double) = floor;}
112 {float(*p)(float) = floorf;}
113 {long double(*p)(long double) = floorl;}
114 {double(*p)(double,double,double) = fma;}
115 {float(*p)(float,float,float) = fmaf;}
116 {long double(*p)(long double,long double,long double) = fmal;}
117 {double(*p)(double,double) = fmax;}
118 {float(*p)(float,float) = fmaxf;}
119 {long double(*p)(long double,long double) = fmaxl;}
120 {double(*p)(double,double) = fmin;}
121 {float(*p)(float,float) = fminf;}
122 {long double(*p)(long double,long double) = fminl;}
123 {double(*p)(double,double) = fmod;}
124 {float(*p)(float,float) = fmodf;}
125 {long double(*p)(long double,long double) = fmodl;}
126 {double(*p)(double,int*) = frexp;}
127 {float(*p)(float,int*) = frexpf;}
128 {long double(*p)(long double,int*) = frexpl;}
129 {double(*p)(double,double) = hypot;}
130 {float(*p)(float,float) = hypotf;}
131 {long double(*p)(long double,long double) = hypotl;}
132 {int(*p)(double) = ilogb;}
133 {int(*p)(float) = ilogbf;}
134 {int(*p)(long double) = ilogbl;}
135 #ifdef _XOPEN_SOURCE
136 {double(*p)(double) = j0;}
137 {double(*p)(double) = j1;}
138 {double(*p)(int,double) = jn;}
139 #endif
140 {double(*p)(double,int) = ldexp;}
141 {float(*p)(float,int) = ldexpf;}
142 {long double(*p)(long double,int) = ldexpl;}
143 {double(*p)(double) = lgamma;}
144 {float(*p)(float) = lgammaf;}
145 {long double(*p)(long double) = lgammal;}
146 {long long(*p)(double) = llrint;}
147 {long long(*p)(float) = llrintf;}
148 {long long(*p)(long double) = llrintl;}
149 {long long(*p)(double) = llround;}
150 {long long(*p)(float) = llroundf;}
151 {long long(*p)(long double) = llroundl;}
152 {double(*p)(double) = log;}
153 {double(*p)(double) = log10;}
154 {float(*p)(float) = log10f;}
155 {long double(*p)(long double) = log10l;}
156 {double(*p)(double) = log1p;}
157 {float(*p)(float) = log1pf;}
158 {long double(*p)(long double) = log1pl;}
159 {double(*p)(double) = log2;}
160 {float(*p)(float) = log2f;}
161 {long double(*p)(long double) = log2l;}
162 {double(*p)(double) = logb;}
163 {float(*p)(float) = logbf;}
164 {long double(*p)(long double) = logbl;}
165 {float(*p)(float) = logf;}
166 {long double(*p)(long double) = logl;}
167 {long(*p)(double) = lrint;}
168 {long(*p)(float) = lrintf;}
169 {long(*p)(long double) = lrintl;}
170 {long(*p)(double) = lround;}
171 {long(*p)(float) = lroundf;}
172 {long(*p)(long double) = lroundl;}
173 {double(*p)(double,double*) = modf;}
174 {float(*p)(float,float*) = modff;}
175 {long double(*p)(long double,long double*) = modfl;}
176 {double(*p)(const char*) = nan;}
177 {float(*p)(const char*) = nanf;}
178 {long double(*p)(const char*) = nanl;}
179 {double(*p)(double) = nearbyint;}
180 {float(*p)(float) = nearbyintf;}
181 {long double(*p)(long double) = nearbyintl;}
182 {double(*p)(double,double) = nextafter;}
183 {float(*p)(float,float) = nextafterf;}
184 {long double(*p)(long double,long double) = nextafterl;}
185 {double(*p)(double,long double) = nexttoward;}
186 {float(*p)(float,long double) = nexttowardf;}
187 {long double(*p)(long double,long double) = nexttowardl;}
188 {double(*p)(double,double) = pow;}
189 {float(*p)(float,float) = powf;}
190 {long double(*p)(long double,long double) = powl;}
191 {double(*p)(double,double) = remainder;}
192 {float(*p)(float,float) = remainderf;}
193 {long double(*p)(long double,long double) = remainderl;}
194 {double(*p)(double,double,int*) = remquo;}
195 {float(*p)(float,float,int*) = remquof;}
196 {long double(*p)(long double,long double,int*) = remquol;}
197 {double(*p)(double) = rint;}
198 {float(*p)(float) = rintf;}
199 {long double(*p)(long double) = rintl;}
200 {double(*p)(double) = round;}
201 {float(*p)(float) = roundf;}
202 {long double(*p)(long double) = roundl;}
203 {double(*p)(double,long) = scalbln;}
204 {float(*p)(float,long) = scalblnf;}
205 {long double(*p)(long double,long) = scalblnl;}
206 {double(*p)(double,int) = scalbn;}
207 {float(*p)(float,int) = scalbnf;}
208 {long double(*p)(long double,int) = scalbnl;}
209 {double(*p)(double) = sin;}
210 {float(*p)(float) = sinf;}
211 {double(*p)(double) = sinh;}
212 {float(*p)(float) = sinhf;}
213 {long double(*p)(long double) = sinhl;}
214 {long double(*p)(long double) = sinl;}
215 {double(*p)(double) = sqrt;}
216 {float(*p)(float) = sqrtf;}
217 {long double(*p)(long double) = sqrtl;}
218 {double(*p)(double) = tan;}
219 {float(*p)(float) = tanf;}
220 {double(*p)(double) = tanh;}
221 {float(*p)(float) = tanhf;}
222 {long double(*p)(long double) = tanhl;}
223 {long double(*p)(long double) = tanl;}
224 {double(*p)(double) = tgamma;}
225 {float(*p)(float) = tgammaf;}
226 {long double(*p)(long double) = tgammal;}
227 {double(*p)(double) = trunc;}
228 {float(*p)(float) = truncf;}
229 {long double(*p)(long double) = truncl;}
230 #ifdef _XOPEN_SOURCE
231 {double(*p)(double) = y0;}
232 {double(*p)(double) = y1;}
233 {double(*p)(int,double) = yn;}
234 #endif