]> git.ipfire.org Git - thirdparty/glibc.git/blame - math/test-tgmath.c
Make ldbl-128 getpayload, setpayload functions use _Float128.
[thirdparty/glibc.git] / math / test-tgmath.c
CommitLineData
4f2689f4 1/* Test compilation of tgmath macros.
f7a9f785 2 Copyright (C) 2001-2016 Free Software Foundation, Inc.
4f2689f4
UD
3 This file is part of the GNU C Library.
4 Contributed by Jakub Jelinek <jakub@redhat.com> and
5 Ulrich Drepper <drepper@redhat.com>, 2001.
6
7 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
4f2689f4
UD
11
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 15 Lesser General Public License for more details.
4f2689f4 16
41bdb6e2 17 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
18 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
4f2689f4
UD
20
21#ifndef HAVE_MAIN
22#undef __NO_MATH_INLINES
23#define __NO_MATH_INLINES 1
24#include <math.h>
25#include <stdio.h>
26#include <tgmath.h>
27
deea1b29 28//#define DEBUG
4f2689f4
UD
29
30static void compile_test (void);
31static void compile_testf (void);
53de11ad 32#ifndef NO_LONG_DOUBLE
4f2689f4 33static void compile_testl (void);
53de11ad 34#endif
4f2689f4
UD
35
36float fx;
37double dx;
38long double lx;
1c298d08
UD
39const float fy = 1.25;
40const double dy = 1.25;
41const long double ly = 1.25;
42complex float fz;
43complex double dz;
44complex long double lz;
4f2689f4
UD
45
46int count_double;
47int count_float;
48int count_ldouble;
1c298d08
UD
49int count_cdouble;
50int count_cfloat;
51int count_cldouble;
4f2689f4 52
cc6a8d74 53#define NCALLS 125
304d7abf 54#define NCALLS_INT 4
1c298d08 55#define NCCALLS 47
4f2689f4 56
0035851c
AS
57static int
58do_test (void)
4f2689f4
UD
59{
60 int result = 0;
61
62 count_float = count_double = count_ldouble = 0;
1c298d08 63 count_cfloat = count_cdouble = count_cldouble = 0;
4f2689f4 64 compile_test ();
1c298d08 65 if (count_float != 0 || count_cfloat != 0)
4f2689f4
UD
66 {
67 puts ("float function called for double test");
68 result = 1;
69 }
1c298d08 70 if (count_ldouble != 0 || count_cldouble != 0)
4f2689f4
UD
71 {
72 puts ("long double function called for double test");
73 result = 1;
74 }
304d7abf 75 if (count_double < NCALLS + NCALLS_INT)
4f2689f4
UD
76 {
77 printf ("double functions not called often enough (%d)\n",
78 count_double);
79 result = 1;
80 }
304d7abf 81 else if (count_double > NCALLS + NCALLS_INT)
4f2689f4
UD
82 {
83 printf ("double functions called too often (%d)\n",
84 count_double);
85 result = 1;
86 }
1c298d08
UD
87 if (count_cdouble < NCCALLS)
88 {
89 printf ("double complex functions not called often enough (%d)\n",
90 count_cdouble);
91 result = 1;
92 }
93 else if (count_cdouble > NCCALLS)
94 {
95 printf ("double complex functions called too often (%d)\n",
96 count_cdouble);
97 result = 1;
98 }
4f2689f4
UD
99
100 count_float = count_double = count_ldouble = 0;
1c298d08 101 count_cfloat = count_cdouble = count_cldouble = 0;
4f2689f4 102 compile_testf ();
1c298d08 103 if (count_double != 0 || count_cdouble != 0)
4f2689f4
UD
104 {
105 puts ("double function called for float test");
106 result = 1;
107 }
1c298d08 108 if (count_ldouble != 0 || count_cldouble != 0)
4f2689f4
UD
109 {
110 puts ("long double function called for float test");
111 result = 1;
112 }
113 if (count_float < NCALLS)
114 {
115 printf ("float functions not called often enough (%d)\n", count_float);
116 result = 1;
117 }
118 else if (count_float > NCALLS)
119 {
120 printf ("float functions called too often (%d)\n",
121 count_double);
122 result = 1;
123 }
1c298d08
UD
124 if (count_cfloat < NCCALLS)
125 {
126 printf ("float complex functions not called often enough (%d)\n",
127 count_cfloat);
128 result = 1;
129 }
130 else if (count_cfloat > NCCALLS)
131 {
132 printf ("float complex functions called too often (%d)\n",
133 count_cfloat);
134 result = 1;
135 }
4f2689f4
UD
136
137#ifndef NO_LONG_DOUBLE
138 count_float = count_double = count_ldouble = 0;
1c298d08 139 count_cfloat = count_cdouble = count_cldouble = 0;
4f2689f4 140 compile_testl ();
1c298d08 141 if (count_float != 0 || count_cfloat != 0)
4f2689f4
UD
142 {
143 puts ("float function called for long double test");
144 result = 1;
145 }
1c298d08 146 if (count_double != 0 || count_cdouble != 0)
4f2689f4
UD
147 {
148 puts ("double function called for long double test");
149 result = 1;
150 }
151 if (count_ldouble < NCALLS)
152 {
153 printf ("long double functions not called often enough (%d)\n",
154 count_ldouble);
155 result = 1;
156 }
157 else if (count_ldouble > NCALLS)
158 {
159 printf ("long double functions called too often (%d)\n",
160 count_double);
161 result = 1;
162 }
1c298d08
UD
163 if (count_cldouble < NCCALLS)
164 {
165 printf ("long double complex functions not called often enough (%d)\n",
166 count_cldouble);
167 result = 1;
168 }
169 else if (count_cldouble > NCCALLS)
170 {
171 printf ("long double complex functions called too often (%d)\n",
172 count_cldouble);
173 result = 1;
174 }
4f2689f4
UD
175#endif
176
177 return result;
178}
179
180/* Now generate the three functions. */
181#define HAVE_MAIN
182
183#define F(name) name
184#define TYPE double
304d7abf 185#define TEST_INT 1
4f2689f4 186#define x dx
1c298d08
UD
187#define y dy
188#define z dz
4f2689f4 189#define count count_double
1c298d08 190#define ccount count_cdouble
4f2689f4
UD
191#include "test-tgmath.c"
192
193#define F(name) name##f
194#define TYPE float
195#define x fx
1c298d08
UD
196#define y fy
197#define z fz
4f2689f4 198#define count count_float
1c298d08 199#define ccount count_cfloat
4f2689f4
UD
200#include "test-tgmath.c"
201
202#ifndef NO_LONG_DOUBLE
203#define F(name) name##l
204#define TYPE long double
205#define x lx
1c298d08
UD
206#define y ly
207#define z lz
4f2689f4 208#define count count_ldouble
1c298d08 209#define ccount count_cldouble
4f2689f4
UD
210#include "test-tgmath.c"
211#endif
212
0035851c
AS
213#define TEST_FUNCTION do_test ()
214#include "../test-skeleton.c"
215
4f2689f4
UD
216#else
217
218#ifdef DEBUG
219#define P() puts (__FUNCTION__)
220#else
221#define P()
222#endif
223
224static void
225F(compile_test) (void)
226{
ee6bf14d 227 TYPE a, b, c = 1.0;
1c298d08 228 complex TYPE d;
4f2689f4 229 int i;
1c298d08 230 int saved_count;
4f2689f4
UD
231 long int j;
232 long long int k;
233
234 a = cos (cos (x));
235 b = acos (acos (a));
236 a = sin (sin (x));
237 b = asin (asin (a));
238 a = tan (tan (x));
239 b = atan (atan (a));
240 c = atan2 (atan2 (a, c), atan2 (b, x));
241 a = cosh (cosh (x));
242 b = acosh (acosh (a));
243 a = sinh (sinh (x));
244 b = asinh (asinh (a));
245 a = tanh (tanh (x));
246 b = atanh (atanh (a));
247 a = exp (exp (x));
248 b = log (log (a));
249 a = log10 (log10 (x));
250 b = ldexp (ldexp (a, 1), 5);
251 a = frexp (frexp (x, &i), &i);
252 b = expm1 (expm1 (a));
253 a = log1p (log1p (x));
254 b = logb (logb (a));
255 a = exp2 (exp2 (x));
256 b = log2 (log2 (a));
257 a = pow (pow (x, a), pow (c, b));
258 b = sqrt (sqrt (a));
259 a = hypot (hypot (x, b), hypot (c, a));
260 b = cbrt (cbrt (a));
261 a = ceil (ceil (x));
262 b = fabs (fabs (a));
263 a = floor (floor (x));
264 b = fmod (fmod (a, b), fmod (c, x));
265 a = nearbyint (nearbyint (x));
266 b = round (round (a));
267 a = trunc (trunc (x));
268 b = remquo (remquo (a, b, &i), remquo (c, x, &i), &i);
269 j = lrint (x) + lround (a);
270 k = llrint (b) + llround (c);
271 a = erf (erf (x));
272 b = erfc (erfc (a));
273 a = tgamma (tgamma (x));
274 b = lgamma (lgamma (a));
275 a = rint (rint (x));
276 b = nextafter (nextafter (a, b), nextafter (c, x));
41a359e2
RS
277 a = nextdown (nextdown (a));
278 b = nexttoward (nexttoward (x, a), c);
279 a = nextup (nextup (a));
4f2689f4
UD
280 b = remainder (remainder (a, b), remainder (c, x));
281 a = scalb (scalb (x, a), (TYPE) (6));
282 k = scalbn (a, 7) + scalbln (c, 10l);
283 i = ilogb (x);
284 a = fdim (fdim (x, a), fdim (c, b));
285 b = fmax (fmax (a, x), fmax (c, b));
286 a = fmin (fmin (x, a), fmin (c, b));
287 b = fma (sin (a), sin (x), sin (c));
5e9d98a3 288 a = totalorder (totalorder (x, b), totalorder (c, x));
cc6a8d74 289 b = totalordermag (totalordermag (x, a), totalordermag (c, x));
304d7abf
UD
290
291#ifdef TEST_INT
292 a = atan2 (i, b);
293 b = remquo (i, a, &i);
294 c = fma (i, b, i);
295 a = pow (i, c);
296#endif
1c298d08
UD
297 x = a + b + c + i + j + k;
298
299 saved_count = count;
300 if (ccount != 0)
301 ccount = -10000;
302
303 d = cos (cos (z));
304 z = acos (acos (d));
305 d = sin (sin (z));
306 z = asin (asin (d));
307 d = tan (tan (z));
308 z = atan (atan (d));
309 d = cosh (cosh (z));
310 z = acosh (acosh (d));
311 d = sinh (sinh (z));
312 z = asinh (asinh (d));
313 d = tanh (tanh (z));
314 z = atanh (atanh (d));
315 d = exp (exp (z));
316 z = log (log (d));
317 d = sqrt (sqrt (z));
318 z = conj (conj (d));
319 d = fabs (conj (a));
320 z = pow (pow (a, d), pow (b, z));
321 d = cproj (cproj (z));
322 z += fabs (cproj (a));
323 a = carg (carg (z));
324 b = creal (creal (d));
325 c = cimag (cimag (z));
326 x += a + b + c + i + j + k;
327 z += d;
328
329 if (saved_count != count)
330 count = -10000;
331
332 if (0)
333 {
334 a = cos (y);
335 a = acos (y);
336 a = sin (y);
337 a = asin (y);
338 a = tan (y);
339 a = atan (y);
340 a = atan2 (y, y);
341 a = cosh (y);
342 a = acosh (y);
343 a = sinh (y);
344 a = asinh (y);
345 a = tanh (y);
346 a = atanh (y);
347 a = exp (y);
348 a = log (y);
349 a = log10 (y);
350 a = ldexp (y, 5);
351 a = frexp (y, &i);
352 a = expm1 (y);
353 a = log1p (y);
354 a = logb (y);
355 a = exp2 (y);
356 a = log2 (y);
357 a = pow (y, y);
358 a = sqrt (y);
359 a = hypot (y, y);
360 a = cbrt (y);
361 a = ceil (y);
362 a = fabs (y);
363 a = floor (y);
364 a = fmod (y, y);
365 a = nearbyint (y);
366 a = round (y);
367 a = trunc (y);
368 a = remquo (y, y, &i);
369 j = lrint (y) + lround (y);
370 k = llrint (y) + llround (y);
371 a = erf (y);
372 a = erfc (y);
373 a = tgamma (y);
374 a = lgamma (y);
375 a = rint (y);
376 a = nextafter (y, y);
377 a = nexttoward (y, y);
378 a = remainder (y, y);
379 a = scalb (y, (const TYPE) (6));
380 k = scalbn (y, 7) + scalbln (y, 10l);
381 i = ilogb (y);
382 a = fdim (y, y);
383 a = fmax (y, y);
384 a = fmin (y, y);
385 a = fma (y, y, y);
5e9d98a3 386 a = totalorder (y, y);
cc6a8d74 387 a = totalordermag (y, y);
1c298d08
UD
388
389#ifdef TEST_INT
390 a = atan2 (i, y);
391 a = remquo (i, y, &i);
392 a = fma (i, y, i);
393 a = pow (i, y);
394#endif
395
396 d = cos ((const complex TYPE) z);
397 d = acos ((const complex TYPE) z);
398 d = sin ((const complex TYPE) z);
399 d = asin ((const complex TYPE) z);
400 d = tan ((const complex TYPE) z);
401 d = atan ((const complex TYPE) z);
402 d = cosh ((const complex TYPE) z);
403 d = acosh ((const complex TYPE) z);
404 d = sinh ((const complex TYPE) z);
405 d = asinh ((const complex TYPE) z);
406 d = tanh ((const complex TYPE) z);
407 d = atanh ((const complex TYPE) z);
408 d = exp ((const complex TYPE) z);
409 d = log ((const complex TYPE) z);
410 d = sqrt ((const complex TYPE) z);
411 d = pow ((const complex TYPE) z, (const complex TYPE) z);
412 d = fabs ((const complex TYPE) z);
413 d = carg ((const complex TYPE) z);
414 d = creal ((const complex TYPE) z);
415 d = cimag ((const complex TYPE) z);
416 d = conj ((const complex TYPE) z);
417 d = cproj ((const complex TYPE) z);
418 }
4f2689f4
UD
419}
420#undef x
1c298d08
UD
421#undef y
422#undef z
4f2689f4
UD
423
424
425TYPE
426(F(cos)) (TYPE x)
427{
428 ++count;
1c298d08 429 P ();
4f2689f4
UD
430 return x;
431}
432
433TYPE
434(F(acos)) (TYPE x)
435{
436 ++count;
1c298d08 437 P ();
4f2689f4
UD
438 return x;
439}
440
441TYPE
442(F(sin)) (TYPE x)
443{
444 ++count;
1c298d08 445 P ();
4f2689f4
UD
446 return x;
447}
448
449TYPE
450(F(asin)) (TYPE x)
451{
452 ++count;
1c298d08 453 P ();
4f2689f4
UD
454 return x;
455}
456
457TYPE
458(F(tan)) (TYPE x)
459{
460 ++count;
1c298d08 461 P ();
4f2689f4
UD
462 return x;
463}
464
465TYPE
466(F(atan)) (TYPE x)
467{
468 ++count;
1c298d08 469 P ();
4f2689f4
UD
470 return x;
471}
472
473TYPE
474(F(atan2)) (TYPE x, TYPE y)
475{
476 ++count;
1c298d08 477 P ();
4f2689f4
UD
478 return x + y;
479}
480
481TYPE
482(F(cosh)) (TYPE x)
483{
484 ++count;
1c298d08 485 P ();
4f2689f4
UD
486 return x;
487}
488
489TYPE
490(F(acosh)) (TYPE x)
491{
492 ++count;
1c298d08 493 P ();
4f2689f4
UD
494 return x;
495}
496
497TYPE
498(F(sinh)) (TYPE x)
499{
500 ++count;
1c298d08 501 P ();
4f2689f4
UD
502 return x;
503}
504
505TYPE
506(F(asinh)) (TYPE x)
507{
508 ++count;
1c298d08 509 P ();
4f2689f4
UD
510 return x;
511}
512
513TYPE
514(F(tanh)) (TYPE x)
515{
516 ++count;
1c298d08 517 P ();
4f2689f4
UD
518 return x;
519}
520
521TYPE
522(F(atanh)) (TYPE x)
523{
524 ++count;
1c298d08 525 P ();
4f2689f4
UD
526 return x;
527}
528
529TYPE
530(F(exp)) (TYPE x)
531{
532 ++count;
1c298d08 533 P ();
4f2689f4
UD
534 return x;
535}
536
537TYPE
538(F(log)) (TYPE x)
539{
540 ++count;
1c298d08 541 P ();
4f2689f4
UD
542 return x;
543}
544
545TYPE
546(F(log10)) (TYPE x)
547{
548 ++count;
1c298d08 549 P ();
4f2689f4
UD
550 return x;
551}
552
553TYPE
554(F(ldexp)) (TYPE x, int y)
555{
556 ++count;
1c298d08
UD
557 P ();
558 return x + y;
4f2689f4
UD
559}
560
561TYPE
562(F(frexp)) (TYPE x, int *y)
563{
564 ++count;
1c298d08
UD
565 P ();
566 return x + *y;
4f2689f4
UD
567}
568
569TYPE
570(F(expm1)) (TYPE x)
571{
572 ++count;
1c298d08 573 P ();
4f2689f4
UD
574 return x;
575}
576
577TYPE
578(F(log1p)) (TYPE x)
579{
580 ++count;
1c298d08 581 P ();
4f2689f4
UD
582 return x;
583}
584
585TYPE
586(F(logb)) (TYPE x)
587{
588 ++count;
1c298d08 589 P ();
4f2689f4
UD
590 return x;
591}
592
593TYPE
594(F(exp2)) (TYPE x)
595{
596 ++count;
1c298d08 597 P ();
4f2689f4
UD
598 return x;
599}
600
601TYPE
602(F(log2)) (TYPE x)
603{
604 ++count;
1c298d08 605 P ();
4f2689f4
UD
606 return x;
607}
608
609TYPE
610(F(pow)) (TYPE x, TYPE y)
611{
612 ++count;
1c298d08 613 P ();
4f2689f4
UD
614 return x + y;
615}
616
617TYPE
618(F(sqrt)) (TYPE x)
619{
620 ++count;
1c298d08 621 P ();
4f2689f4
UD
622 return x;
623}
624
625TYPE
626(F(hypot)) (TYPE x, TYPE y)
627{
628 ++count;
1c298d08 629 P ();
4f2689f4
UD
630 return x + y;
631}
632
633TYPE
634(F(cbrt)) (TYPE x)
635{
636 ++count;
1c298d08 637 P ();
4f2689f4
UD
638 return x;
639}
640
641TYPE
642(F(ceil)) (TYPE x)
643{
644 ++count;
1c298d08 645 P ();
4f2689f4
UD
646 return x;
647}
648
649TYPE
650(F(fabs)) (TYPE x)
651{
652 ++count;
1c298d08 653 P ();
4f2689f4
UD
654 return x;
655}
656
657TYPE
658(F(floor)) (TYPE x)
659{
660 ++count;
1c298d08 661 P ();
4f2689f4
UD
662 return x;
663}
664
665TYPE
666(F(fmod)) (TYPE x, TYPE y)
667{
668 ++count;
1c298d08 669 P ();
4f2689f4
UD
670 return x + y;
671}
672
673TYPE
674(F(nearbyint)) (TYPE x)
675{
676 ++count;
1c298d08 677 P ();
4f2689f4
UD
678 return x;
679}
680
681TYPE
682(F(round)) (TYPE x)
683{
684 ++count;
1c298d08 685 P ();
4f2689f4
UD
686 return x;
687}
688
689TYPE
690(F(trunc)) (TYPE x)
691{
692 ++count;
1c298d08 693 P ();
4f2689f4
UD
694 return x;
695}
696
697TYPE
698(F(remquo)) (TYPE x, TYPE y, int *i)
699{
700 ++count;
1c298d08
UD
701 P ();
702 return x + y + *i;
4f2689f4
UD
703}
704
705long int
706(F(lrint)) (TYPE x)
707{
708 ++count;
1c298d08 709 P ();
4f2689f4
UD
710 return x;
711}
712
713long int
714(F(lround)) (TYPE x)
715{
716 ++count;
1c298d08 717 P ();
4f2689f4
UD
718 return x;
719}
720
721long long int
722(F(llrint)) (TYPE x)
723{
724 ++count;
1c298d08 725 P ();
4f2689f4
UD
726 return x;
727}
728
729long long int
730(F(llround)) (TYPE x)
731{
732 ++count;
1c298d08 733 P ();
4f2689f4
UD
734 return x;
735}
736
737TYPE
738(F(erf)) (TYPE x)
739{
740 ++count;
1c298d08 741 P ();
4f2689f4
UD
742 return x;
743}
744
745TYPE
746(F(erfc)) (TYPE x)
747{
748 ++count;
1c298d08 749 P ();
4f2689f4
UD
750 return x;
751}
752
753TYPE
754(F(tgamma)) (TYPE x)
755{
756 ++count;
1c298d08 757 P ();
4f2689f4
UD
758 return x;
759}
760
761TYPE
762(F(lgamma)) (TYPE x)
763{
764 ++count;
1c298d08 765 P ();
4f2689f4
UD
766 return x;
767}
768
769TYPE
770(F(rint)) (TYPE x)
771{
772 ++count;
1c298d08 773 P ();
4f2689f4
UD
774 return x;
775}
776
777TYPE
778(F(nextafter)) (TYPE x, TYPE y)
779{
780 ++count;
1c298d08 781 P ();
4f2689f4
UD
782 return x + y;
783}
784
41a359e2
RS
785TYPE
786(F(nextdown)) (TYPE x)
787{
788 ++count;
789 P ();
790 return x;
791}
792
4f2689f4
UD
793TYPE
794(F(nexttoward)) (TYPE x, long double y)
795{
796 ++count;
1c298d08
UD
797 P ();
798 return x + y;
4f2689f4
UD
799}
800
41a359e2
RS
801TYPE
802(F(nextup)) (TYPE x)
803{
804 ++count;
805 P ();
806 return x;
807}
808
4f2689f4
UD
809TYPE
810(F(remainder)) (TYPE x, TYPE y)
811{
812 ++count;
1c298d08 813 P ();
4f2689f4
UD
814 return x + y;
815}
816
817TYPE
818(F(scalb)) (TYPE x, TYPE y)
819{
820 ++count;
1c298d08 821 P ();
4f2689f4
UD
822 return x + y;
823}
824
825TYPE
826(F(scalbn)) (TYPE x, int y)
827{
828 ++count;
1c298d08
UD
829 P ();
830 return x + y;
4f2689f4
UD
831}
832
833TYPE
834(F(scalbln)) (TYPE x, long int y)
835{
836 ++count;
1c298d08
UD
837 P ();
838 return x + y;
4f2689f4
UD
839}
840
841int
842(F(ilogb)) (TYPE x)
843{
844 ++count;
1c298d08 845 P ();
4f2689f4
UD
846 return x;
847}
848
849TYPE
850(F(fdim)) (TYPE x, TYPE y)
851{
852 ++count;
1c298d08 853 P ();
4f2689f4
UD
854 return x + y;
855}
856
857TYPE
858(F(fmin)) (TYPE x, TYPE y)
859{
860 ++count;
1c298d08 861 P ();
4f2689f4
UD
862 return x + y;
863}
864
865TYPE
866(F(fmax)) (TYPE x, TYPE y)
867{
868 ++count;
1c298d08 869 P ();
4f2689f4
UD
870 return x + y;
871}
872
873TYPE
874(F(fma)) (TYPE x, TYPE y, TYPE z)
875{
876 ++count;
1c298d08 877 P ();
4f2689f4
UD
878 return x + y + z;
879}
880
5e9d98a3
JM
881int
882(F(totalorder)) (TYPE x, TYPE y)
883{
884 ++count;
885 P ();
886 return x + y;
887}
888
cc6a8d74
JM
889int
890(F(totalordermag)) (TYPE x, TYPE y)
891{
892 ++count;
893 P ();
894 return x + y;
895}
896
1c298d08
UD
897complex TYPE
898(F(cacos)) (complex TYPE x)
899{
900 ++ccount;
901 P ();
902 return x;
903}
904
905complex TYPE
906(F(casin)) (complex TYPE x)
907{
908 ++ccount;
909 P ();
910 return x;
911}
912
913complex TYPE
914(F(catan)) (complex TYPE x)
915{
916 ++ccount;
917 P ();
918 return x;
919}
920
921complex TYPE
922(F(ccos)) (complex TYPE x)
923{
924 ++ccount;
925 P ();
926 return x;
927}
928
929complex TYPE
930(F(csin)) (complex TYPE x)
931{
932 ++ccount;
933 P ();
934 return x;
935}
936
937complex TYPE
938(F(ctan)) (complex TYPE x)
939{
940 ++ccount;
941 P ();
942 return x;
943}
944
945complex TYPE
946(F(cacosh)) (complex TYPE x)
947{
948 ++ccount;
949 P ();
950 return x;
951}
952
953complex TYPE
954(F(casinh)) (complex TYPE x)
955{
956 ++ccount;
957 P ();
958 return x;
959}
960
961complex TYPE
962(F(catanh)) (complex TYPE x)
963{
964 ++ccount;
965 P ();
966 return x;
967}
968
969complex TYPE
970(F(ccosh)) (complex TYPE x)
971{
972 ++ccount;
973 P ();
974 return x;
975}
976
977complex TYPE
978(F(csinh)) (complex TYPE x)
979{
980 ++ccount;
981 P ();
982 return x;
983}
984
985complex TYPE
986(F(ctanh)) (complex TYPE x)
987{
988 ++ccount;
989 P ();
990 return x;
991}
992
993complex TYPE
994(F(cexp)) (complex TYPE x)
995{
996 ++ccount;
997 P ();
998 return x;
999}
1000
1001complex TYPE
1002(F(clog)) (complex TYPE x)
1003{
1004 ++ccount;
1005 P ();
1006 return x;
1007}
1008
1009complex TYPE
1010(F(csqrt)) (complex TYPE x)
1011{
1012 ++ccount;
1013 P ();
1014 return x;
1015}
1016
1017complex TYPE
1018(F(cpow)) (complex TYPE x, complex TYPE y)
1019{
1020 ++ccount;
1021 P ();
1022 return x + y;
1023}
1024
1025TYPE
1026(F(cabs)) (complex TYPE x)
1027{
1028 ++ccount;
1029 P ();
1030 return x;
1031}
1032
1033TYPE
1034(F(carg)) (complex TYPE x)
1035{
1036 ++ccount;
1037 P ();
1038 return x;
1039}
1040
1041TYPE
1042(F(creal)) (complex TYPE x)
1043{
1044 ++ccount;
1045 P ();
1046 return __real__ x;
1047}
1048
1049TYPE
1050(F(cimag)) (complex TYPE x)
1051{
1052 ++ccount;
1053 P ();
1054 return __imag__ x;
1055}
1056
1057complex TYPE
1058(F(conj)) (complex TYPE x)
1059{
1060 ++ccount;
1061 P ();
1062 return x;
1063}
1064
1065complex TYPE
1066(F(cproj)) (complex TYPE x)
1067{
1068 ++ccount;
1069 P ();
1070 return x;
1071}
1072
4f2689f4
UD
1073#undef F
1074#undef TYPE
1075#undef count
1c298d08 1076#undef ccount
304d7abf 1077#undef TEST_INT
4f2689f4 1078#endif