Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 413 lines (404 sloc) 14.868 kb
f8620b1 @leto Initial import of asmutils-0.18
authored
1 /*
2 Copyright (C) 2001 Nick Kurshev <nickols_k@mail.ru>
3 Based on libm-test.c testsuite from glibc-2.1.3
4
5 $Id: testm.c,v 1.2 2001/07/20 07:02:56 konst Exp $
6 */
7 #ifndef _GNU_SOURCE
8 # define _GNU_SOURCE
9 #endif
10
11 # define __NO_MATH_INLINES 1
12 # define __USE_ISOC9X 1
13 # define __USE_MISC 1
14 # define __USE_XOPEN_EXTENDED 1
15 # define __USE_GNU 1
16 # define __USE_BSD 1
17 # define __USE_XOPEN 1
18 # define __USE_SVID 1
19 #include <math.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <assert.h>
23
24 #ifndef NAN
25 #define NAN (0./0.)
26 #endif
27 #ifndef INF
28 #define INF HUGE_VAL
29 #endif
30
31 typedef double MATHTYPE;
32 #define FUNC(name) name
33 /*
34 typedef MATHTYPE long double;
35 #define FUNC(name) name##l
36
37 typedef MATHTYPE float;
38 #define FUNC(name) name##f
39 */
40
41 #define EPS 10e-10
42
43 #define MATH_ASSERT(name,expr,result)\
44 printf("%s - %s computed: %10.15e should be: %10.15e\n",name,\
45 (expr >= result-EPS && expr <= result+EPS) ? "ok" : "fail",(double)expr,(double)result)
46 #define INT_ASSERT(name,expr,result)\
47 printf("%s - %s computed: %i should be: %i\n",name,\
48 (expr == result) ? "ok" : "fail",(int)expr,(int)result)
49 #define LLINT_ASSERT(name,expr,result)\
50 printf("%s - %s computed: %lli should be: %lli\n",name,\
51 (expr == result) ? "ok" : "fail",(long long int)expr,(long long int)result)
52 #define NAN_ASSERT(name,expr)\
53 printf("%s - %s (NAN version)\n",name,\
54 isnan(expr) ? "ok" : "fail")
55
56 int main ( void )
57 {
58 MATHTYPE xtmp,ytmp;
59 int itmp;
60 printf("*** It's test for new mathlib *** !!!\n\n");
61 MATH_ASSERT("acos",acos(1.) , 0.);
62 MATH_ASSERT("acos",acos(-1.) , M_PI);
63 MATH_ASSERT("acos",acos(-0.5) , 2.*M_PI/3.);
64 printf("\n");
65 MATH_ASSERT("acosh",acosh(1.) , 0.);
66 MATH_ASSERT("acosh",acosh(7.) , 2.6339157938496334172L);
67 MATH_ASSERT("acosh",acosh(INF) , INF);
68 printf("\n");
69 MATH_ASSERT("asin",asin(0.) , 0.);
70 MATH_ASSERT("asin",asin(1.) , M_PI/2.);
71 MATH_ASSERT("asin",asin(0.5) , M_PI/6.);
72 printf("\n");
73 MATH_ASSERT("asinh",asinh(0.) , 0.);
74 MATH_ASSERT("asinh",asinh(0.7) , 0.652666566082355786L);
75 MATH_ASSERT("asinh",asinh(INF) , INF);
76 printf("\n");
77 MATH_ASSERT("atan",atan(0.) , 0.);
78 MATH_ASSERT("atan",atan(1.) , M_PI/4);
79 MATH_ASSERT("atan",atan(0.7) , 0.6107259643892086165L);
80 printf("\n");
81 MATH_ASSERT("atan2",atan2 (-0.,+0.) , -0.);
82 MATH_ASSERT("atan2",atan2 (0.4,0.0003) , 1.5700463269355215718L);
83 MATH_ASSERT("atan2",atan2 (3., INF) , 0.);
84 MATH_ASSERT("atan2",atan2 (-3., INF) , -0.);
85 MATH_ASSERT("atan2",atan2 (3., -INF) , M_PI);
86 MATH_ASSERT("atan2",atan2 (-3., -INF) , -M_PI);
87 MATH_ASSERT("atan2",atan2 (INF, 2.) , M_PI/2);
88 MATH_ASSERT("atan2",atan2 (-INF, -3.) , -M_PI/2);
89 MATH_ASSERT("atan2",atan2 (INF, INF) , M_PI/4);
90 MATH_ASSERT("atan2",atan2 (-INF, INF) , -M_PI/4);
91 MATH_ASSERT("atan2",atan2 (INF, -INF) , 3*M_PI/4);
92 MATH_ASSERT("atan2",atan2 (-INF, -INF) , -3*M_PI/4);
93 printf("\n");
94 MATH_ASSERT("atanh",atanh(0.) , 0.);
95 MATH_ASSERT("atanh",atanh(0.7) , 0.8673005276940531944L);
96 printf("\n");
97 MATH_ASSERT("cbrt",cbrt (-0.) , -0.);
98 MATH_ASSERT("cbrt",cbrt (-0.001) , -0.1);
99 MATH_ASSERT("cbrt",cbrt (27.) , 3.);
100 MATH_ASSERT("cbrt",cbrt (0.7) , 0.8879040017426007084L);
101 MATH_ASSERT("cbrt",cbrt (-8.) , -2.);
102 MATH_ASSERT("cbrt",cbrt (INF) , INF);
103 MATH_ASSERT("cbrt",cbrt (-INF) , -INF);
104 NAN_ASSERT("cbrt",cbrt (NAN));
105 printf("\n");
106 MATH_ASSERT("ceil",ceil (-0.) , -0.);
107 MATH_ASSERT("ceil",ceil (M_PI) , 4.);
108 MATH_ASSERT("ceil",ceil (-M_PI) , -3.);
109 MATH_ASSERT("ceil",ceil (INF) , INF);
110 MATH_ASSERT("ceil",ceil (-INF) , -INF);
111 printf("\n");
112 MATH_ASSERT("copysign",copysign (0., -4.) , -0.);
113 MATH_ASSERT("copysign",copysign (0., 4.) , 0.);
114 MATH_ASSERT("copysign",copysign (INF, -4.) , -INF);
115 MATH_ASSERT("copysign",copysign (INF, 4.) , INF);
116 MATH_ASSERT("copysign",copysign (-INF, -4.) , -INF);
117 MATH_ASSERT("copysign",copysign (-INF, 4.) , INF);
118 NAN_ASSERT("copysign",copysign (NAN, -4.));
119 NAN_ASSERT("copysign",copysign (NAN, 4.));
120 NAN_ASSERT("copysign",copysign (-NAN, -4.));
121 NAN_ASSERT("copysign",copysign (-NAN, 4.));
122 printf("\n");
123 MATH_ASSERT("cos",cos (+0.) , 1.);
124 MATH_ASSERT("cos",cos (M_PI/2.) , 0.);
125 MATH_ASSERT("cos",cos (2.*M_PI/3.) , -0.5);
126 printf("\n");
127 MATH_ASSERT("cosh",cosh (0.) , 1.);
128 MATH_ASSERT("cosh",cosh (0.7) , 1.255169005630943018L);
129 INT_ASSERT("cosh",isinf(cosh (INF)) , 1);
130 INT_ASSERT("cosh",isinf(cosh (-INF)) , 1);
131 printf("\n");
132 /* erf */
133 /* erfc */
134 MATH_ASSERT("exp",exp (0.) , 1.);
135 MATH_ASSERT("exp",exp (1.) , M_E);
136 MATH_ASSERT("exp",exp (0.7) , 2.0137527074704765216L);
137 INT_ASSERT("exp",isinf(exp (INF)) , 1);
138 MATH_ASSERT("exp",exp (-INF) , 0.);
139 printf("\n");
140 MATH_ASSERT("exp10",exp10 (0.) , 1.);
141 MATH_ASSERT("exp10",exp10 (3.) , 1000.);
142 MATH_ASSERT("exp10",exp10 (0.7) , 5.0118723362727228500L);
143 INT_ASSERT("exp10",isinf(exp10 (INF)) , 1);
144 MATH_ASSERT("exp10",exp10 (-INF) , 0.);
145 printf("\n");
146 MATH_ASSERT("exp2",exp2 (0.) , 1.);
147 MATH_ASSERT("exp2",exp2 (10.) , 1024.);
148 MATH_ASSERT("exp2",exp2 (0.7) , 1.6245047927124710452L);
149 INT_ASSERT("exp2",isinf(exp2 (INF)) , 1);
150 MATH_ASSERT("exp2",exp2 (-INF) , 0.);
151 printf("\n");
152 MATH_ASSERT("expm1",expm1(0.), 0.);
153 MATH_ASSERT("expm1",expm1(INF), INF);
154 MATH_ASSERT("expm1",expm1(-INF), -1.);
155 MATH_ASSERT("expm1",expm1(1.), M_E -1.);
156 MATH_ASSERT("expm1",expm1(0.7), 1.0137527074704765216L);
157 printf("\n");
158 MATH_ASSERT("fabs",fabs(-0.) , 0.);
159 MATH_ASSERT("fabs",fabs(-1.22) , 1.22);
160 MATH_ASSERT("fabs",fabs(38.) , 38.);
161 MATH_ASSERT("fabs",fabs(INF) , INF);
162 MATH_ASSERT("fabs",fabs(-INF) , INF);
163 printf("\n");
164 MATH_ASSERT("fdim",fdim (0., 0.) , 0.);
165 MATH_ASSERT("fdim",fdim (9., 0.) , 9.);
166 MATH_ASSERT("fdim",fdim (0., 9.) , 9.);
167 MATH_ASSERT("fdim",fdim (-9., 0.) , 9.);
168 MATH_ASSERT("fdim",fdim (0., -9.) , 9.);
169 printf("\n");
170 MATH_ASSERT("floor",floor (-0.) , -0.);
171 MATH_ASSERT("floor",floor (M_PI) , 3.);
172 MATH_ASSERT("floor",floor (-M_PI) , -4.);
173 MATH_ASSERT("floor",floor(INF) , INF);
174 MATH_ASSERT("floor",floor(-INF) , -INF);
175 printf("\n");
176 MATH_ASSERT("fma",fma(1.0, 2.0, 3.0) , 5.0);
177 printf("\n");
178 MATH_ASSERT("fmax",fmax (0., 0.) , 0.);
179 MATH_ASSERT("fmax",fmax (9., 0.) , 9.);
180 MATH_ASSERT("fmax",fmax (0., -9.) , 0.);
181 MATH_ASSERT("fmax",fmax (9., INF) , INF);
182 MATH_ASSERT("fmax",fmax (0., -INF) , 0.);
183 MATH_ASSERT("fmax",fmax (9., NAN) , 9.);
184 MATH_ASSERT("fmax",fmax (-9., NAN) , -9.);
185 MATH_ASSERT("fmax",fmax (INF, NAN) , INF);
186 MATH_ASSERT("fmax",fmax (-INF, NAN) , -INF);
187 printf("\n");
188 MATH_ASSERT("fmin",fmin (0., 0.) , 0.);
189 MATH_ASSERT("fmin",fmin (9., 0.) , 0.);
190 MATH_ASSERT("fmin",fmin (0., -9.) , -9.);
191 MATH_ASSERT("fmin",fmin (9., INF) , 9.);
192 MATH_ASSERT("fmin",fmin (0., -INF) , -INF);
193 MATH_ASSERT("fmin",fmin (9., NAN) , 9.);
194 MATH_ASSERT("fmin",fmin (-9., NAN) , -9.);
195 MATH_ASSERT("fmin",fmin (INF, NAN) , INF);
196 MATH_ASSERT("fmin",fmin (-INF, NAN) , -INF);
197 printf("\n");
198 MATH_ASSERT("fmod",fmod (6.5, 2.3) , 1.9);
199 MATH_ASSERT("fmod",fmod (-6.5, 2.3) , -1.9);
200 MATH_ASSERT("fmod",fmod (6.5, -2.3) , 1.9);
201 MATH_ASSERT("fmod",fmod (-6.5, -2.3) , -1.9);
202 MATH_ASSERT("fmod",fmod (6.5, INF) , 6.5);
203 MATH_ASSERT("fmod",fmod (-6.5, -INF) , -6.5);
204 printf("\n");
205 /* fpclassify */
206 MATH_ASSERT("frexp",frexp(-27.34, &itmp), -0.854375L);
207 INT_ASSERT("frexp",itmp, 5);
208 MATH_ASSERT("frexp",frexp(0., &itmp), 0.);
209 INT_ASSERT("frexp",itmp, 0);
210 MATH_ASSERT("frexp",frexp(12.8, &itmp), 0.8L);
211 INT_ASSERT("frexp",itmp, 4);
212 MATH_ASSERT("frexp",frexp(INF, &itmp), INF);
213 MATH_ASSERT("frexp",frexp(-INF, &itmp), -INF);
214 printf("\n");
215 /* gamma */
216 MATH_ASSERT("hypot",hypot(3., 4.) , 5.);
217 MATH_ASSERT("hypot",hypot(0.7, 1.2) , 1.3892443989449804508L);
218 MATH_ASSERT("hypot",hypot(INF, NAN) , INF);
219 MATH_ASSERT("hypot",hypot(-INF, NAN) , INF);
220 NAN_ASSERT("hypot",hypot(NAN, NAN));
221 printf("\n");
222 INT_ASSERT("ilogb",ilogb (1.) , 0);
223 INT_ASSERT("ilogb",ilogb (M_E) , 1);
224 INT_ASSERT("ilogb",ilogb (1024) , 10);
225 INT_ASSERT("ilogb",ilogb (-2000.) , 10);
226 printf("\n");
227 INT_ASSERT("isfinite", isfinite(0.), 1);
228 INT_ASSERT("isfinite", isfinite(-0.), 1);
229 INT_ASSERT("isfinite", isfinite(10.), 1);
230 INT_ASSERT("isfinite", isfinite(INF), 0);
231 INT_ASSERT("isfinite", isfinite(-INF), 0);
232 INT_ASSERT("isfinite", isfinite(NAN), 0);
233 printf("\n");
234 #if 0
235 INT_ASSERT("isnormal", isnormal(0.), 0);
236 INT_ASSERT("isnormal", isnormal(-0.), 0);
237 INT_ASSERT("isnormal", isnormal(10.), 1);
238 INT_ASSERT("isnormal", isnormal(INF), 0);
239 INT_ASSERT("isnormal", isnormal(-INF), 0);
240 INT_ASSERT("isnormal", isnormal(NAN), 0);
241 printf("\n");
242 #endif
243 INT_ASSERT("isnan", isnan(0.), 0);
244 INT_ASSERT("isnan", isnan(-0.), 0);
245 INT_ASSERT("isnan", isnan(10.), 0);
246 INT_ASSERT("isnan", isnan(INF), 0);
247 INT_ASSERT("isnan", isnan(-INF), 0);
248 INT_ASSERT("isnan", isnan(NAN), 1);
249 printf("\n");
250 INT_ASSERT("isinf", isinf(0.), 0);
251 INT_ASSERT("isinf", isinf(-0.), 0);
252 INT_ASSERT("isinf", isinf(10.), 0);
253 INT_ASSERT("isinf", isinf(INF), 1);
254 INT_ASSERT("isinf", isinf(-INF), -1);
255 INT_ASSERT("isinf", isinf(NAN), 0);
256 printf("\n");
257 /* lgamma */
258 MATH_ASSERT("ldexp",ldexp (0., 0.) , 0.);
259 MATH_ASSERT("ldexp",ldexp (0.8, 4.) , 12.8);
260 MATH_ASSERT("ldexp",ldexp (-0.854375L, 5.) , -27.34L);
261 MATH_ASSERT("ldexp",ldexp (INF, 1.) , INF);
262 MATH_ASSERT("ldexp",ldexp (-INF, 1.) , -INF);
263 NAN_ASSERT("ldexp",ldexp (NAN, 1.));
264 printf("\n");
265 LLINT_ASSERT("llrint", llrint(0.), 0);
266 LLINT_ASSERT("llrint", llrint(-0.2), 0);
267 LLINT_ASSERT("llrint", llrint(-1.4), -1);
268 LLINT_ASSERT("llrint", llrint(72057594037927936.0), 72057594037927936LL);
269 printf("\n");
270 MATH_ASSERT("log",log (M_E) , 1.);
271 MATH_ASSERT("log",log (1./M_E) , -1.);
272 MATH_ASSERT("log",log (2.) , M_LN2);
273 MATH_ASSERT("log",log (10.) , M_LN10);
274 MATH_ASSERT("log",log (INF) , INF);
275 printf("\n");
276 MATH_ASSERT("log10",log10 (0.1) , -1.);
277 MATH_ASSERT("log10",log10 (10.) , 1.);
278 MATH_ASSERT("log10",log10 (M_E) , M_LOG10E);
279 MATH_ASSERT("log10",log10 (10000.) , 4.);
280 MATH_ASSERT("log10",log10 (INF) , INF);
281 printf("\n");
282 MATH_ASSERT("log2",log2 (1.) , 0.);
283 MATH_ASSERT("log2",log2 (M_E) , M_LOG2E);
284 MATH_ASSERT("log2",log2 (2.) , 1.);
285 MATH_ASSERT("log2",log2 (16.) , 4.);
286 MATH_ASSERT("log2",log2 (INF) , INF);
287 printf("\n");
288 MATH_ASSERT("log1p",log1p (0.) , 0.);
289 MATH_ASSERT("log1p",log1p (M_E - 1.0) , 1.);
290 MATH_ASSERT("log1p",log1p (-0.3) , -0.35667494393873237891L);
291 MATH_ASSERT("log1p",log1p (INF) , INF);
292 printf("\n");
293 MATH_ASSERT("logb",logb (1.) , 0.);
294 MATH_ASSERT("logb",logb (M_E) , 1.);
295 MATH_ASSERT("logb",logb (1024.) , 10.);
296 MATH_ASSERT("logb",logb (-2000.) , 10.);
297 MATH_ASSERT("logb",logb (INF) , INF);
298 printf("\n");
299 MATH_ASSERT("lrint",lrint(0.) , 0.);
300 MATH_ASSERT("lrint",lrint(0.4) , 0.);
301 MATH_ASSERT("lrint",lrint(1.4) , 1.);
302 MATH_ASSERT("lrint",lrint(-1.4) , -1.);
303 printf("\n");
304 /* modf */
305 #if 0
306 /* Sometime those functions raise exceptions that is wrong */
307 MATH_ASSERT("nearbyint",nearbyint(copysign(0., -1.)), copysign(0., -1.));
308 MATH_ASSERT("nearbyint",nearbyint(+0.), +0.);
309 MATH_ASSERT("nearbyint",nearbyint(INF), INF);
310 MATH_ASSERT("nearbyint",nearbyint(-INF), -INF);
311 MATH_ASSERT("nearbyint",nearbyint(+5.1), +5.0);
312 MATH_ASSERT("nearbyint",nearbyint(+4.9), +5.0);
313 printf("\n");
314 #endif
315 /* nextafter */
316 MATH_ASSERT("pow",pow(0., 1.25) , 0.);
317 MATH_ASSERT("pow",pow(3.16, 0.) , 1.);
318 MATH_ASSERT("pow",pow(5., 3.) , 125.);
319 MATH_ASSERT("pow",pow(36., 0.5) , 6.);
320 MATH_ASSERT("pow",pow(10., 3.) , 1000.);
321 MATH_ASSERT("pow",pow(2., 3.) , 8.);
322 NAN_ASSERT("pow",pow(NAN, 1.));
323 NAN_ASSERT("pow",pow(NAN, NAN));
324 NAN_ASSERT("pow",pow(0., NAN));
325 MATH_ASSERT("pow",pow(INF, 1.) , INF);
326 MATH_ASSERT("pow",pow(INF, INF) , INF);
327 MATH_ASSERT("pow",pow(1., INF) , 1.);
328 MATH_ASSERT("pow",pow(0., INF) , 0.);
329 printf("\n");
330 MATH_ASSERT("pow10",pow10(0.) , 1.);
331 MATH_ASSERT("pow10",pow10(1.) , 10.);
332 MATH_ASSERT("pow10",pow10(3.) , 1000.);
333 printf("\n");
334 MATH_ASSERT("remainder",remainder(1.625, 1.0) , -0.375);
335 MATH_ASSERT("remainder",remainder(-1.625, 1.0) , 0.375);
336 MATH_ASSERT("remainder",remainder(1.625, -1.0) , -0.375);
337 MATH_ASSERT("remainder",remainder(-1.625, -1.0) , 0.375);
338 printf("\n");
339 MATH_ASSERT("rint",rint(-0.) , -0.);
340 printf("\n");
341 /* remquo */
342 MATH_ASSERT("scalb",scalb(0.8, 4.), 12.8);
343 MATH_ASSERT("scalb",scalb(-0.854375L, 5), -27.34L);
344 MATH_ASSERT("scalb",scalb(0., 2.), 0.);
345 NAN_ASSERT("scalb",scalb(3., -2.5));
346 NAN_ASSERT("scalb",scalb(2., 0.5));
347 MATH_ASSERT("scalb",scalb(INF, 0.), INF);
348 MATH_ASSERT("scalb",scalb(-INF, 0.), -INF);
349 NAN_ASSERT("scalb",scalb(INF, -INF));
350 NAN_ASSERT("scalb",scalb(-INF, -INF));
351 MATH_ASSERT("scalb",scalb(3., -INF), 0.);
352 MATH_ASSERT("scalb",scalb(-2., -INF), -0.);
353 printf("\n");
354 MATH_ASSERT("scalbn",scalbn (0., 0.) , 0.);
355 MATH_ASSERT("scalbn",scalbn (0.8, 4.) , 12.8);
356 MATH_ASSERT("scalbn",scalbn (-0.854375L, 5.) , -27.34L);
357 MATH_ASSERT("scalbn",scalbn (INF, 1.) , INF);
358 MATH_ASSERT("scalbn",scalbn (-INF, 1.) , -INF);
359 NAN_ASSERT("scalbn",scalbn (NAN, 1.));
360 printf("\n");
361 /*
362 MATH_ASSERT("significand",significand (0.) , 0.);
363 Later
364 printf("\n");
365 */
366 /* signbit */
367 MATH_ASSERT("sin",sin (-0.) , -0.);
368 MATH_ASSERT("sin",sin (M_PI/2.) , 1.);
369 MATH_ASSERT("sin",sin (-M_PI/2.) , -1.);
370 MATH_ASSERT("sin",sin (0.7) , 0.64421768723769105367L);
371 printf("\n");
372 sincos(0.,&xtmp,&ytmp);
373 MATH_ASSERT("sincos",xtmp, 0.);
374 MATH_ASSERT("sincos",ytmp, 1.);
375 sincos(M_PI/2.,&xtmp,&ytmp);
376 MATH_ASSERT("sincos",xtmp, 1.);
377 MATH_ASSERT("sincos",ytmp, 0.);
378 sincos(0.7,&xtmp,&ytmp);
379 MATH_ASSERT("sincos",xtmp, 0.64421768723769105367L);
380 MATH_ASSERT("sincos",ytmp, 0.76484218728448842626L);
381 printf("\n");
382 MATH_ASSERT("sinh",sinh (0.) , 0.);
383 MATH_ASSERT("sinh",sinh (0.7) , 0.75858370183953350346L);
384 MATH_ASSERT("sinh",sinh (INF) , INF);
385 MATH_ASSERT("sinh",sinh (-INF) , -INF);
386 printf("\n");
387 MATH_ASSERT("sqrt",sqrt(9.) , 3.);
388 MATH_ASSERT("sqrt",sqrt(0.25) , 0.5);
389 MATH_ASSERT("sqrt",sqrt(0.7) , 0.83666002653407554798L);
390 NAN_ASSERT("sqrt",sqrt(NAN));
391 MATH_ASSERT("sqrt",sqrt(INF) , INF);
392 printf("\n");
393 MATH_ASSERT("tan",tan (-0.) , -0.);
394 MATH_ASSERT("tan",tan (M_PI/4.) , 1.);
395 MATH_ASSERT("tan",tan (0.7) , 0.84228838046307944813L);
396 printf("\n");
397 MATH_ASSERT("tanh",tanh (0.) , 0.);
398 MATH_ASSERT("tanh",tanh (0.7) , 0.60436777711716349631L);
399 MATH_ASSERT("tanh",tanh (INF) , 1.);
400 MATH_ASSERT("tanh",tanh (-INF) , -1.);
401 printf("\n");
402 /* tgamma */
403 MATH_ASSERT("trunc",trunc(0.) , 0.);
404 MATH_ASSERT("trunc",trunc(0.625) , 0.);
405 MATH_ASSERT("trunc",trunc(1048580.625L) , 1048580L);
406 MATH_ASSERT("trunc",trunc(INF) , INF);
407 MATH_ASSERT("trunc",trunc(-INF) , -INF);
408 NAN_ASSERT("trunc",trunc(NAN));
409 printf("\n");
410 exit(0); /* no errors */
411 return 0;
412 }
Something went wrong with that request. Please try again.