nptl: fix potential merge of __rseq_* relro symbols
[glibc.git] / math / test-tgmath.c
blobf3bcac4866c7711a508a52676a1b29f49931f40a
1 /* Test compilation of tgmath macros.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 #ifndef HAVE_MAIN
20 #include <float.h>
21 #include <math.h>
22 #include <stdint.h>
23 #include <stdio.h>
24 #include <tgmath.h>
26 //#define DEBUG
28 static void compile_test (void);
29 static void compile_testf (void);
30 #if LDBL_MANT_DIG > DBL_MANT_DIG
31 static void compile_testl (void);
32 #endif
34 float fx;
35 double dx;
36 long double lx;
37 const float fy = 1.25;
38 const double dy = 1.25;
39 const long double ly = 1.25;
40 complex float fz;
41 complex double dz;
42 complex long double lz;
44 volatile int count_double;
45 volatile int count_float;
46 volatile int count_ldouble;
47 volatile int count_cdouble;
48 volatile int count_cfloat;
49 volatile int count_cldouble;
51 #define NCALLS 168
52 #define NCALLS_INT 4
53 #define NCCALLS 47
55 static int
56 do_test (void)
58 int result = 0;
60 count_float = count_double = count_ldouble = 0;
61 count_cfloat = count_cdouble = count_cldouble = 0;
62 compile_test ();
63 if (count_float != 0 || count_cfloat != 0)
65 puts ("float function called for double test");
66 result = 1;
68 if (count_ldouble != 0 || count_cldouble != 0)
70 puts ("long double function called for double test");
71 result = 1;
73 if (count_double < NCALLS + NCALLS_INT)
75 printf ("double functions not called often enough (%d)\n",
76 count_double);
77 result = 1;
79 else if (count_double > NCALLS + NCALLS_INT)
81 printf ("double functions called too often (%d)\n",
82 count_double);
83 result = 1;
85 if (count_cdouble < NCCALLS)
87 printf ("double complex functions not called often enough (%d)\n",
88 count_cdouble);
89 result = 1;
91 else if (count_cdouble > NCCALLS)
93 printf ("double complex functions called too often (%d)\n",
94 count_cdouble);
95 result = 1;
98 count_float = count_double = count_ldouble = 0;
99 count_cfloat = count_cdouble = count_cldouble = 0;
100 compile_testf ();
101 if (count_double != 0 || count_cdouble != 0)
103 puts ("double function called for float test");
104 result = 1;
106 if (count_ldouble != 0 || count_cldouble != 0)
108 puts ("long double function called for float test");
109 result = 1;
111 if (count_float < NCALLS)
113 printf ("float functions not called often enough (%d)\n", count_float);
114 result = 1;
116 else if (count_float > NCALLS)
118 printf ("float functions called too often (%d)\n",
119 count_double);
120 result = 1;
122 if (count_cfloat < NCCALLS)
124 printf ("float complex functions not called often enough (%d)\n",
125 count_cfloat);
126 result = 1;
128 else if (count_cfloat > NCCALLS)
130 printf ("float complex functions called too often (%d)\n",
131 count_cfloat);
132 result = 1;
135 #if LDBL_MANT_DIG > DBL_MANT_DIG
136 count_float = count_double = count_ldouble = 0;
137 count_cfloat = count_cdouble = count_cldouble = 0;
138 compile_testl ();
139 if (count_float != 0 || count_cfloat != 0)
141 puts ("float function called for long double test");
142 result = 1;
144 if (count_double != 0 || count_cdouble != 0)
146 puts ("double function called for long double test");
147 result = 1;
149 if (count_ldouble < NCALLS)
151 printf ("long double functions not called often enough (%d)\n",
152 count_ldouble);
153 result = 1;
155 else if (count_ldouble > NCALLS)
157 printf ("long double functions called too often (%d)\n",
158 count_double);
159 result = 1;
161 if (count_cldouble < NCCALLS)
163 printf ("long double complex functions not called often enough (%d)\n",
164 count_cldouble);
165 result = 1;
167 else if (count_cldouble > NCCALLS)
169 printf ("long double complex functions called too often (%d)\n",
170 count_cldouble);
171 result = 1;
173 #endif
175 return result;
178 /* Now generate the three functions. */
179 #define HAVE_MAIN
181 #define F(name) name
182 #define TYPE double
183 #define TEST_INT 1
184 #define x dx
185 #define y dy
186 #define z dz
187 #define count count_double
188 #define ccount count_cdouble
189 #include "test-tgmath.c"
191 #define F(name) name##f
192 #define TYPE float
193 #define x fx
194 #define y fy
195 #define z fz
196 #define count count_float
197 #define ccount count_cfloat
198 #include "test-tgmath.c"
200 #if LDBL_MANT_DIG > DBL_MANT_DIG
201 #define F(name) name##l
202 #define TYPE long double
203 #define x lx
204 #define y ly
205 #define z lz
206 #define count count_ldouble
207 #define ccount count_cldouble
208 #include "test-tgmath.c"
209 #endif
211 #define TEST_FUNCTION do_test ()
212 #include "../test-skeleton.c"
214 #else
216 #ifdef DEBUG
217 #define P() puts (__FUNCTION__)
218 #else
219 #define P()
220 #endif
222 static void
223 F(compile_test) (void)
225 TYPE a, b, c = 1.0;
226 complex TYPE d;
227 int i = 2;
228 int saved_count;
229 long int j;
230 long long int k;
231 intmax_t m;
232 uintmax_t um;
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 = exp2m1 (exp2m1 (b));
254 b = exp10m1 (exp10m1 (a));
255 a = log1p (log1p (x));
256 b = logb (logb (a));
257 a = exp2 (exp2 (x));
258 a = exp10 (exp10 (x));
259 b = log2 (log2 (a));
260 a = log2p1 (log2p1 (x));
261 a = log10p1 (log10p1 (x));
262 a = logp1 (logp1 (x));
263 a = pow (pow (x, a), pow (c, b));
264 b = sqrt (sqrt (a));
265 a = hypot (hypot (x, b), hypot (c, a));
266 b = cbrt (cbrt (a));
267 a = ceil (ceil (x));
268 b = fabs (fabs (a));
269 a = floor (floor (x));
270 b = fmod (fmod (a, b), fmod (c, x));
271 a = nearbyint (nearbyint (x));
272 b = round (round (a));
273 c = roundeven (roundeven (a));
274 a = trunc (trunc (x));
275 b = remquo (remquo (a, b, &i), remquo (c, x, &i), &i);
276 j = lrint (x) + lround (a);
277 k = llrint (b) + llround (c);
278 m = fromfp (a, FP_INT_UPWARD, 2) + fromfpx (b, FP_INT_DOWNWARD, 3);
279 um = ufromfp (c, FP_INT_TONEAREST, 4) + ufromfpx (a, FP_INT_TOWARDZERO, 5);
280 a = erf (erf (x));
281 b = erfc (erfc (a));
282 a = tgamma (tgamma (x));
283 b = lgamma (lgamma (a));
284 a = rint (rint (x));
285 b = nextafter (nextafter (a, b), nextafter (c, x));
286 a = nextdown (nextdown (a));
287 b = nexttoward (nexttoward (x, a), c);
288 a = nextup (nextup (a));
289 b = remainder (remainder (a, b), remainder (c, x));
290 a = scalb (scalb (x, a), (TYPE) (6));
291 k = scalbn (a, 7) + scalbln (c, 10l);
292 i = ilogb (x);
293 j = llogb (x);
294 a = fdim (fdim (x, a), fdim (c, b));
295 b = fmax (fmax (a, x), fmax (c, b));
296 a = fmin (fmin (x, a), fmin (c, b));
297 b = fmaxmag (fmaxmag (a, x), fmaxmag (c, b));
298 a = fminmag (fminmag (x, a), fminmag (c, b));
299 b = fmaximum (fmaximum (a, x), fmaximum (c, b));
300 a = fminimum (fminimum (x, a), fminimum (c, b));
301 b = fmaximum_num (fmaximum_num (a, x), fmaximum_num (c, b));
302 a = fminimum_num (fminimum_num (x, a), fminimum_num (c, b));
303 b = fmaximum_mag (fmaximum_mag (a, x), fmaximum_mag (c, b));
304 a = fminimum_mag (fminimum_mag (x, a), fminimum_mag (c, b));
305 b = fmaximum_mag_num (fmaximum_mag_num (a, x), fmaximum_mag_num (c, b));
306 a = fminimum_mag_num (fminimum_mag_num (x, a), fminimum_mag_num (c, b));
307 b = fma (sin (a), sin (x), sin (c));
309 #ifdef TEST_INT
310 a = atan2 (i, b);
311 b = remquo (i, a, &i);
312 c = fma (i, b, i);
313 a = pow (i, c);
314 #endif
315 x = a + b + c + i + j + k + m + um;
317 saved_count = count;
318 if (ccount != 0)
319 ccount = -10000;
321 d = cos (cos (z));
322 z = acos (acos (d));
323 d = sin (sin (z));
324 z = asin (asin (d));
325 d = tan (tan (z));
326 z = atan (atan (d));
327 d = cosh (cosh (z));
328 z = acosh (acosh (d));
329 d = sinh (sinh (z));
330 z = asinh (asinh (d));
331 d = tanh (tanh (z));
332 z = atanh (atanh (d));
333 d = exp (exp (z));
334 z = log (log (d));
335 d = sqrt (sqrt (z));
336 z = conj (conj (d));
337 d = fabs (conj (a));
338 z = pow (pow (a, d), pow (b, z));
339 d = cproj (cproj (z));
340 z += fabs (cproj (a));
341 a = carg (carg (z));
342 b = creal (creal (d));
343 c = cimag (cimag (z));
344 x += a + b + c + i + j + k;
345 z += d;
347 if (saved_count != count)
348 count = -10000;
350 if (0)
352 a = cos (y);
353 a = acos (y);
354 a = sin (y);
355 a = asin (y);
356 a = tan (y);
357 a = atan (y);
358 a = atan2 (y, y);
359 a = cosh (y);
360 a = acosh (y);
361 a = sinh (y);
362 a = asinh (y);
363 a = tanh (y);
364 a = atanh (y);
365 a = exp (y);
366 a = log (y);
367 a = log10 (y);
368 a = ldexp (y, 5);
369 a = frexp (y, &i);
370 a = expm1 (y);
371 a = exp2m1 (y);
372 a = exp10m1 (y);
373 a = log1p (y);
374 a = logb (y);
375 a = exp2 (y);
376 a = exp10 (y);
377 a = log2 (y);
378 a = log2p1 (y);
379 a = log10p1 (y);
380 a = logp1 (y);
381 a = pow (y, y);
382 a = sqrt (y);
383 a = hypot (y, y);
384 a = cbrt (y);
385 a = ceil (y);
386 a = fabs (y);
387 a = floor (y);
388 a = fmod (y, y);
389 a = nearbyint (y);
390 a = round (y);
391 a = roundeven (y);
392 a = trunc (y);
393 a = remquo (y, y, &i);
394 j = lrint (y) + lround (y);
395 k = llrint (y) + llround (y);
396 m = fromfp (y, FP_INT_UPWARD, 6) + fromfpx (y, FP_INT_DOWNWARD, 7);
397 um = (ufromfp (y, FP_INT_TONEAREST, 8)
398 + ufromfpx (y, FP_INT_TOWARDZERO, 9));
399 a = erf (y);
400 a = erfc (y);
401 a = tgamma (y);
402 a = lgamma (y);
403 a = rint (y);
404 a = nextafter (y, y);
405 a = nexttoward (y, y);
406 a = remainder (y, y);
407 a = scalb (y, (const TYPE) (6));
408 k = scalbn (y, 7) + scalbln (y, 10l);
409 i = ilogb (y);
410 j = llogb (y);
411 a = fdim (y, y);
412 a = fmax (y, y);
413 a = fmin (y, y);
414 a = fmaxmag (y, y);
415 a = fminmag (y, y);
416 a = fmaximum (y, y);
417 a = fminimum (y, y);
418 a = fmaximum_num (y, y);
419 a = fminimum_num (y, y);
420 a = fmaximum_mag (y, y);
421 a = fminimum_mag (y, y);
422 a = fmaximum_mag_num (y, y);
423 a = fminimum_mag_num (y, y);
424 a = fma (y, y, y);
426 #ifdef TEST_INT
427 a = atan2 (i, y);
428 a = remquo (i, y, &i);
429 a = fma (i, y, i);
430 a = pow (i, y);
431 #endif
433 d = cos ((const complex TYPE) z);
434 d = acos ((const complex TYPE) z);
435 d = sin ((const complex TYPE) z);
436 d = asin ((const complex TYPE) z);
437 d = tan ((const complex TYPE) z);
438 d = atan ((const complex TYPE) z);
439 d = cosh ((const complex TYPE) z);
440 d = acosh ((const complex TYPE) z);
441 d = sinh ((const complex TYPE) z);
442 d = asinh ((const complex TYPE) z);
443 d = tanh ((const complex TYPE) z);
444 d = atanh ((const complex TYPE) z);
445 d = exp ((const complex TYPE) z);
446 d = log ((const complex TYPE) z);
447 d = sqrt ((const complex TYPE) z);
448 d = pow ((const complex TYPE) z, (const complex TYPE) z);
449 d = fabs ((const complex TYPE) z);
450 d = carg ((const complex TYPE) z);
451 d = creal ((const complex TYPE) z);
452 d = cimag ((const complex TYPE) z);
453 d = conj ((const complex TYPE) z);
454 d = cproj ((const complex TYPE) z);
457 #undef x
458 #undef y
459 #undef z
462 TYPE
463 (F(cos)) (TYPE x)
465 ++count;
466 P ();
467 return x;
470 TYPE
471 (F(acos)) (TYPE x)
473 ++count;
474 P ();
475 return x;
478 TYPE
479 (F(sin)) (TYPE x)
481 ++count;
482 P ();
483 return x;
486 TYPE
487 (F(asin)) (TYPE x)
489 ++count;
490 P ();
491 return x;
494 TYPE
495 (F(tan)) (TYPE x)
497 ++count;
498 P ();
499 return x;
502 TYPE
503 (F(atan)) (TYPE x)
505 ++count;
506 P ();
507 return x;
510 TYPE
511 (F(atan2)) (TYPE x, TYPE y)
513 ++count;
514 P ();
515 return x + y;
518 TYPE
519 (F(cosh)) (TYPE x)
521 ++count;
522 P ();
523 return x;
526 TYPE
527 (F(acosh)) (TYPE x)
529 ++count;
530 P ();
531 return x;
534 TYPE
535 (F(sinh)) (TYPE x)
537 ++count;
538 P ();
539 return x;
542 TYPE
543 (F(asinh)) (TYPE x)
545 ++count;
546 P ();
547 return x;
550 TYPE
551 (F(tanh)) (TYPE x)
553 ++count;
554 P ();
555 return x;
558 TYPE
559 (F(atanh)) (TYPE x)
561 ++count;
562 P ();
563 return x;
566 TYPE
567 (F(exp)) (TYPE x)
569 ++count;
570 P ();
571 return x;
574 TYPE
575 (F(log)) (TYPE x)
577 ++count;
578 P ();
579 return x;
582 TYPE
583 (F(log10)) (TYPE x)
585 ++count;
586 P ();
587 return x;
590 TYPE
591 (F(ldexp)) (TYPE x, int y)
593 ++count;
594 P ();
595 return x + y;
598 TYPE
599 (F(frexp)) (TYPE x, int *y)
601 ++count;
602 P ();
603 return x + *y;
606 TYPE
607 (F(expm1)) (TYPE x)
609 ++count;
610 P ();
611 return x;
614 TYPE
615 (F(exp2m1)) (TYPE x)
617 ++count;
618 P ();
619 return x;
622 TYPE
623 (F(exp10m1)) (TYPE x)
625 ++count;
626 P ();
627 return x;
630 TYPE
631 (F(log1p)) (TYPE x)
633 ++count;
634 P ();
635 return x;
638 TYPE
639 (F(logb)) (TYPE x)
641 ++count;
642 P ();
643 return x;
646 TYPE
647 (F(exp10)) (TYPE x)
649 ++count;
650 P ();
651 return x;
654 TYPE
655 (F(exp2)) (TYPE x)
657 ++count;
658 P ();
659 return x;
662 TYPE
663 (F(log2)) (TYPE x)
665 ++count;
666 P ();
667 return x;
670 TYPE
671 (F(log2p1)) (TYPE x)
673 ++count;
674 P ();
675 return x;
678 TYPE
679 (F(log10p1)) (TYPE x)
681 ++count;
682 P ();
683 return x;
686 TYPE
687 (F(logp1)) (TYPE x)
689 ++count;
690 P ();
691 return x;
694 TYPE
695 (F(pow)) (TYPE x, TYPE y)
697 ++count;
698 P ();
699 return x + y;
702 TYPE
703 (F(sqrt)) (TYPE x)
705 ++count;
706 P ();
707 return x;
710 TYPE
711 (F(hypot)) (TYPE x, TYPE y)
713 ++count;
714 P ();
715 return x + y;
718 TYPE
719 (F(cbrt)) (TYPE x)
721 ++count;
722 P ();
723 return x;
726 TYPE
727 (F(ceil)) (TYPE x)
729 ++count;
730 P ();
731 return x;
734 TYPE
735 (F(fabs)) (TYPE x)
737 ++count;
738 P ();
739 return x;
742 TYPE
743 (F(floor)) (TYPE x)
745 ++count;
746 P ();
747 return x;
750 TYPE
751 (F(fmod)) (TYPE x, TYPE y)
753 ++count;
754 P ();
755 return x + y;
758 TYPE
759 (F(nearbyint)) (TYPE x)
761 ++count;
762 P ();
763 return x;
766 TYPE
767 (F(round)) (TYPE x)
769 ++count;
770 P ();
771 return x;
774 TYPE
775 (F(roundeven)) (TYPE x)
777 ++count;
778 P ();
779 return x;
782 TYPE
783 (F(trunc)) (TYPE x)
785 ++count;
786 P ();
787 return x;
790 TYPE
791 (F(remquo)) (TYPE x, TYPE y, int *i)
793 ++count;
794 P ();
795 return x + y + *i;
798 long int
799 (F(lrint)) (TYPE x)
801 ++count;
802 P ();
803 return x;
806 long int
807 (F(lround)) (TYPE x)
809 ++count;
810 P ();
811 return x;
814 long long int
815 (F(llrint)) (TYPE x)
817 ++count;
818 P ();
819 return x;
822 long long int
823 (F(llround)) (TYPE x)
825 ++count;
826 P ();
827 return x;
830 intmax_t
831 (F(fromfp)) (TYPE x, int round, unsigned int width)
833 ++count;
834 P ();
835 return x;
838 intmax_t
839 (F(fromfpx)) (TYPE x, int round, unsigned int width)
841 ++count;
842 P ();
843 return x;
846 uintmax_t
847 (F(ufromfp)) (TYPE x, int round, unsigned int width)
849 ++count;
850 P ();
851 return x;
854 uintmax_t
855 (F(ufromfpx)) (TYPE x, int round, unsigned int width)
857 ++count;
858 P ();
859 return x;
862 TYPE
863 (F(erf)) (TYPE x)
865 ++count;
866 P ();
867 return x;
870 TYPE
871 (F(erfc)) (TYPE x)
873 ++count;
874 P ();
875 return x;
878 TYPE
879 (F(tgamma)) (TYPE x)
881 ++count;
882 P ();
883 return x;
886 TYPE
887 (F(lgamma)) (TYPE x)
889 ++count;
890 P ();
891 return x;
894 TYPE
895 (F(rint)) (TYPE x)
897 ++count;
898 P ();
899 return x;
902 TYPE
903 (F(nextafter)) (TYPE x, TYPE y)
905 ++count;
906 P ();
907 return x + y;
910 TYPE
911 (F(nextdown)) (TYPE x)
913 ++count;
914 P ();
915 return x;
918 TYPE
919 (F(nexttoward)) (TYPE x, long double y)
921 ++count;
922 P ();
923 return x + y;
926 TYPE
927 (F(nextup)) (TYPE x)
929 ++count;
930 P ();
931 return x;
934 TYPE
935 (F(remainder)) (TYPE x, TYPE y)
937 ++count;
938 P ();
939 return x + y;
942 TYPE
943 (F(scalb)) (TYPE x, TYPE y)
945 ++count;
946 P ();
947 return x + y;
950 TYPE
951 (F(scalbn)) (TYPE x, int y)
953 ++count;
954 P ();
955 return x + y;
958 TYPE
959 (F(scalbln)) (TYPE x, long int y)
961 ++count;
962 P ();
963 return x + y;
967 (F(ilogb)) (TYPE x)
969 ++count;
970 P ();
971 return x;
974 long int
975 (F(llogb)) (TYPE x)
977 ++count;
978 P ();
979 return x;
982 TYPE
983 (F(fdim)) (TYPE x, TYPE y)
985 ++count;
986 P ();
987 return x + y;
990 TYPE
991 (F(fmin)) (TYPE x, TYPE y)
993 ++count;
994 P ();
995 return x + y;
998 TYPE
999 (F(fmax)) (TYPE x, TYPE y)
1001 ++count;
1002 P ();
1003 return x + y;
1006 TYPE
1007 (F(fminmag)) (TYPE x, TYPE y)
1009 ++count;
1010 P ();
1011 return x + y;
1014 TYPE
1015 (F(fmaxmag)) (TYPE x, TYPE y)
1017 ++count;
1018 P ();
1019 return x + y;
1022 TYPE
1023 (F(fminimum)) (TYPE x, TYPE y)
1025 ++count;
1026 P ();
1027 return x + y;
1030 TYPE
1031 (F(fmaximum)) (TYPE x, TYPE y)
1033 ++count;
1034 P ();
1035 return x + y;
1038 TYPE
1039 (F(fminimum_num)) (TYPE x, TYPE y)
1041 ++count;
1042 P ();
1043 return x + y;
1046 TYPE
1047 (F(fmaximum_num)) (TYPE x, TYPE y)
1049 ++count;
1050 P ();
1051 return x + y;
1054 TYPE
1055 (F(fminimum_mag)) (TYPE x, TYPE y)
1057 ++count;
1058 P ();
1059 return x + y;
1062 TYPE
1063 (F(fmaximum_mag)) (TYPE x, TYPE y)
1065 ++count;
1066 P ();
1067 return x + y;
1070 TYPE
1071 (F(fminimum_mag_num)) (TYPE x, TYPE y)
1073 ++count;
1074 P ();
1075 return x + y;
1078 TYPE
1079 (F(fmaximum_mag_num)) (TYPE x, TYPE y)
1081 ++count;
1082 P ();
1083 return x + y;
1086 TYPE
1087 (F(fma)) (TYPE x, TYPE y, TYPE z)
1089 ++count;
1090 P ();
1091 return x + y + z;
1094 complex TYPE
1095 (F(cacos)) (complex TYPE x)
1097 ++ccount;
1098 P ();
1099 return x;
1102 complex TYPE
1103 (F(casin)) (complex TYPE x)
1105 ++ccount;
1106 P ();
1107 return x;
1110 complex TYPE
1111 (F(catan)) (complex TYPE x)
1113 ++ccount;
1114 P ();
1115 return x;
1118 complex TYPE
1119 (F(ccos)) (complex TYPE x)
1121 ++ccount;
1122 P ();
1123 return x;
1126 complex TYPE
1127 (F(csin)) (complex TYPE x)
1129 ++ccount;
1130 P ();
1131 return x;
1134 complex TYPE
1135 (F(ctan)) (complex TYPE x)
1137 ++ccount;
1138 P ();
1139 return x;
1142 complex TYPE
1143 (F(cacosh)) (complex TYPE x)
1145 ++ccount;
1146 P ();
1147 return x;
1150 complex TYPE
1151 (F(casinh)) (complex TYPE x)
1153 ++ccount;
1154 P ();
1155 return x;
1158 complex TYPE
1159 (F(catanh)) (complex TYPE x)
1161 ++ccount;
1162 P ();
1163 return x;
1166 complex TYPE
1167 (F(ccosh)) (complex TYPE x)
1169 ++ccount;
1170 P ();
1171 return x;
1174 complex TYPE
1175 (F(csinh)) (complex TYPE x)
1177 ++ccount;
1178 P ();
1179 return x;
1182 complex TYPE
1183 (F(ctanh)) (complex TYPE x)
1185 ++ccount;
1186 P ();
1187 return x;
1190 complex TYPE
1191 (F(cexp)) (complex TYPE x)
1193 ++ccount;
1194 P ();
1195 return x;
1198 complex TYPE
1199 (F(clog)) (complex TYPE x)
1201 ++ccount;
1202 P ();
1203 return x;
1206 complex TYPE
1207 (F(csqrt)) (complex TYPE x)
1209 ++ccount;
1210 P ();
1211 return x;
1214 complex TYPE
1215 (F(cpow)) (complex TYPE x, complex TYPE y)
1217 ++ccount;
1218 P ();
1219 return x + y;
1222 TYPE
1223 (F(cabs)) (complex TYPE x)
1225 ++ccount;
1226 P ();
1227 return x;
1230 TYPE
1231 (F(carg)) (complex TYPE x)
1233 ++ccount;
1234 P ();
1235 return x;
1238 TYPE
1239 (F(creal)) (complex TYPE x)
1241 ++ccount;
1242 P ();
1243 return __real__ x;
1246 TYPE
1247 (F(cimag)) (complex TYPE x)
1249 ++ccount;
1250 P ();
1251 return __imag__ x;
1254 complex TYPE
1255 (F(conj)) (complex TYPE x)
1257 ++ccount;
1258 P ();
1259 return x;
1262 complex TYPE
1263 (F(cproj)) (complex TYPE x)
1265 ++ccount;
1266 P ();
1267 return x;
1270 #undef F
1271 #undef TYPE
1272 #undef count
1273 #undef ccount
1274 #undef TEST_INT
1275 #endif