Back to index

glibc  2.9
test-tgmath.c
Go to the documentation of this file.
00001 /* Test compilation of tgmath macros.
00002    Copyright (C) 2001, 2003, 2004, 2007 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004    Contributed by Jakub Jelinek <jakub@redhat.com> and
00005    Ulrich Drepper <drepper@redhat.com>, 2001.
00006 
00007    The GNU C Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    The GNU C Library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with the GNU C Library; if not, write to the Free
00019    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00020    02111-1307 USA.  */
00021 
00022 #ifndef HAVE_MAIN
00023 #undef __NO_MATH_INLINES
00024 #define __NO_MATH_INLINES 1
00025 #include <math.h>
00026 #include <stdio.h>
00027 #include <tgmath.h>
00028 
00029 //#define DEBUG
00030 
00031 static void compile_test (void);
00032 static void compile_testf (void);
00033 #ifndef NO_LONG_DOUBLE
00034 static void compile_testl (void);
00035 #endif
00036 
00037 float fx;
00038 double dx;
00039 long double lx;
00040 const float fy = 1.25;
00041 const double dy = 1.25;
00042 const long double ly = 1.25;
00043 complex float fz;
00044 complex double dz;
00045 complex long double lz;
00046 
00047 int count_double;
00048 int count_float;
00049 int count_ldouble;
00050 int count_cdouble;
00051 int count_cfloat;
00052 int count_cldouble;
00053 
00054 #define NCALLS     115
00055 #define NCALLS_INT 4
00056 #define NCCALLS    47
00057 
00058 int
00059 main (void)
00060 {
00061   int result = 0;
00062 
00063   count_float = count_double = count_ldouble = 0;
00064   count_cfloat = count_cdouble = count_cldouble = 0;
00065   compile_test ();
00066   if (count_float != 0 || count_cfloat != 0)
00067     {
00068       puts ("float function called for double test");
00069       result = 1;
00070     }
00071   if (count_ldouble != 0 || count_cldouble != 0)
00072     {
00073       puts ("long double function called for double test");
00074       result = 1;
00075     }
00076   if (count_double < NCALLS + NCALLS_INT)
00077     {
00078       printf ("double functions not called often enough (%d)\n",
00079              count_double);
00080       result = 1;
00081     }
00082   else if (count_double > NCALLS + NCALLS_INT)
00083     {
00084       printf ("double functions called too often (%d)\n",
00085              count_double);
00086       result = 1;
00087     }
00088   if (count_cdouble < NCCALLS)
00089     {
00090       printf ("double complex functions not called often enough (%d)\n",
00091              count_cdouble);
00092       result = 1;
00093     }
00094   else if (count_cdouble > NCCALLS)
00095     {
00096       printf ("double complex functions called too often (%d)\n",
00097              count_cdouble);
00098       result = 1;
00099     }
00100 
00101   count_float = count_double = count_ldouble = 0;
00102   count_cfloat = count_cdouble = count_cldouble = 0;
00103   compile_testf ();
00104   if (count_double != 0 || count_cdouble != 0)
00105     {
00106       puts ("double function called for float test");
00107       result = 1;
00108     }
00109   if (count_ldouble != 0 || count_cldouble != 0)
00110     {
00111       puts ("long double function called for float test");
00112       result = 1;
00113     }
00114   if (count_float < NCALLS)
00115     {
00116       printf ("float functions not called often enough (%d)\n", count_float);
00117       result = 1;
00118     }
00119   else if (count_float > NCALLS)
00120     {
00121       printf ("float functions called too often (%d)\n",
00122              count_double);
00123       result = 1;
00124     }
00125   if (count_cfloat < NCCALLS)
00126     {
00127       printf ("float complex functions not called often enough (%d)\n",
00128              count_cfloat);
00129       result = 1;
00130     }
00131   else if (count_cfloat > NCCALLS)
00132     {
00133       printf ("float complex functions called too often (%d)\n",
00134              count_cfloat);
00135       result = 1;
00136     }
00137 
00138 #ifndef NO_LONG_DOUBLE
00139   count_float = count_double = count_ldouble = 0;
00140   count_cfloat = count_cdouble = count_cldouble = 0;
00141   compile_testl ();
00142   if (count_float != 0 || count_cfloat != 0)
00143     {
00144       puts ("float function called for long double test");
00145       result = 1;
00146     }
00147   if (count_double != 0 || count_cdouble != 0)
00148     {
00149       puts ("double function called for long double test");
00150       result = 1;
00151     }
00152   if (count_ldouble < NCALLS)
00153     {
00154       printf ("long double functions not called often enough (%d)\n",
00155              count_ldouble);
00156       result = 1;
00157     }
00158   else if (count_ldouble > NCALLS)
00159     {
00160       printf ("long double functions called too often (%d)\n",
00161              count_double);
00162       result = 1;
00163     }
00164   if (count_cldouble < NCCALLS)
00165     {
00166       printf ("long double complex functions not called often enough (%d)\n",
00167              count_cldouble);
00168       result = 1;
00169     }
00170   else if (count_cldouble > NCCALLS)
00171     {
00172       printf ("long double complex functions called too often (%d)\n",
00173              count_cldouble);
00174       result = 1;
00175     }
00176 #endif
00177 
00178   return result;
00179 }
00180 
00181 /* Now generate the three functions.  */
00182 #define HAVE_MAIN
00183 
00184 #define F(name) name
00185 #define TYPE double
00186 #define TEST_INT 1
00187 #define x dx
00188 #define y dy
00189 #define z dz
00190 #define count count_double
00191 #define ccount count_cdouble
00192 #include "test-tgmath.c"
00193 
00194 #define F(name) name##f
00195 #define TYPE float
00196 #define x fx
00197 #define y fy
00198 #define z fz
00199 #define count count_float
00200 #define ccount count_cfloat
00201 #include "test-tgmath.c"
00202 
00203 #ifndef NO_LONG_DOUBLE
00204 #define F(name) name##l
00205 #define TYPE long double
00206 #define x lx
00207 #define y ly
00208 #define z lz
00209 #define count count_ldouble
00210 #define ccount count_cldouble
00211 #include "test-tgmath.c"
00212 #endif
00213 
00214 #else
00215 
00216 #ifdef DEBUG
00217 #define P() puts (__FUNCTION__)
00218 #else
00219 #define P()
00220 #endif
00221 
00222 static void
00223 F(compile_test) (void)
00224 {
00225   TYPE a, b, c = 1.0;
00226   complex TYPE d;
00227   int i;
00228   int saved_count;
00229   long int j;
00230   long long int k;
00231 
00232   a = cos (cos (x));
00233   b = acos (acos (a));
00234   a = sin (sin (x));
00235   b = asin (asin (a));
00236   a = tan (tan (x));
00237   b = atan (atan (a));
00238   c = atan2 (atan2 (a, c), atan2 (b, x));
00239   a = cosh (cosh (x));
00240   b = acosh (acosh (a));
00241   a = sinh (sinh (x));
00242   b = asinh (asinh (a));
00243   a = tanh (tanh (x));
00244   b = atanh (atanh (a));
00245   a = exp (exp (x));
00246   b = log (log (a));
00247   a = log10 (log10 (x));
00248   b = ldexp (ldexp (a, 1), 5);
00249   a = frexp (frexp (x, &i), &i);
00250   b = expm1 (expm1 (a));
00251   a = log1p (log1p (x));
00252   b = logb (logb (a));
00253   a = exp2 (exp2 (x));
00254   b = log2 (log2 (a));
00255   a = pow (pow (x, a), pow (c, b));
00256   b = sqrt (sqrt (a));
00257   a = hypot (hypot (x, b), hypot (c, a));
00258   b = cbrt (cbrt (a));
00259   a = ceil (ceil (x));
00260   b = fabs (fabs (a));
00261   a = floor (floor (x));
00262   b = fmod (fmod (a, b), fmod (c, x));
00263   a = nearbyint (nearbyint (x));
00264   b = round (round (a));
00265   a = trunc (trunc (x));
00266   b = remquo (remquo (a, b, &i), remquo (c, x, &i), &i);
00267   j = lrint (x) + lround (a);
00268   k = llrint (b) + llround (c);
00269   a = erf (erf (x));
00270   b = erfc (erfc (a));
00271   a = tgamma (tgamma (x));
00272   b = lgamma (lgamma (a));
00273   a = rint (rint (x));
00274   b = nextafter (nextafter (a, b), nextafter (c, x));
00275   a = nexttoward (nexttoward (x, a), c);
00276   b = remainder (remainder (a, b), remainder (c, x));
00277   a = scalb (scalb (x, a), (TYPE) (6));
00278   k = scalbn (a, 7) + scalbln (c, 10l);
00279   i = ilogb (x);
00280   a = fdim (fdim (x, a), fdim (c, b));
00281   b = fmax (fmax (a, x), fmax (c, b));
00282   a = fmin (fmin (x, a), fmin (c, b));
00283   b = fma (sin (a), sin (x), sin (c));
00284 
00285 #ifdef TEST_INT
00286   a = atan2 (i, b);
00287   b = remquo (i, a, &i);
00288   c = fma (i, b, i);
00289   a = pow (i, c);
00290 #endif
00291   x = a + b + c + i + j + k;
00292 
00293   saved_count = count;
00294   if (ccount != 0)
00295     ccount = -10000;
00296 
00297   d = cos (cos (z));
00298   z = acos (acos (d));
00299   d = sin (sin (z));
00300   z = asin (asin (d));
00301   d = tan (tan (z));
00302   z = atan (atan (d));
00303   d = cosh (cosh (z));
00304   z = acosh (acosh (d));
00305   d = sinh (sinh (z));
00306   z = asinh (asinh (d));
00307   d = tanh (tanh (z));
00308   z = atanh (atanh (d));
00309   d = exp (exp (z));
00310   z = log (log (d));
00311   d = sqrt (sqrt (z));
00312   z = conj (conj (d));
00313   d = fabs (conj (a));
00314   z = pow (pow (a, d), pow (b, z));
00315   d = cproj (cproj (z));
00316   z += fabs (cproj (a));
00317   a = carg (carg (z));
00318   b = creal (creal (d));
00319   c = cimag (cimag (z));
00320   x += a + b + c + i + j + k;
00321   z += d;
00322 
00323   if (saved_count != count)
00324     count = -10000;
00325 
00326   if (0)
00327     {
00328       a = cos (y);
00329       a = acos (y);
00330       a = sin (y);
00331       a = asin (y);
00332       a = tan (y);
00333       a = atan (y);
00334       a = atan2 (y, y);
00335       a = cosh (y);
00336       a = acosh (y);
00337       a = sinh (y);
00338       a = asinh (y);
00339       a = tanh (y);
00340       a = atanh (y);
00341       a = exp (y);
00342       a = log (y);
00343       a = log10 (y);
00344       a = ldexp (y, 5);
00345       a = frexp (y, &i);
00346       a = expm1 (y);
00347       a = log1p (y);
00348       a = logb (y);
00349       a = exp2 (y);
00350       a = log2 (y);
00351       a = pow (y, y);
00352       a = sqrt (y);
00353       a = hypot (y, y);
00354       a = cbrt (y);
00355       a = ceil (y);
00356       a = fabs (y);
00357       a = floor (y);
00358       a = fmod (y, y);
00359       a = nearbyint (y);
00360       a = round (y);
00361       a = trunc (y);
00362       a = remquo (y, y, &i);
00363       j = lrint (y) + lround (y);
00364       k = llrint (y) + llround (y);
00365       a = erf (y);
00366       a = erfc (y);
00367       a = tgamma (y);
00368       a = lgamma (y);
00369       a = rint (y);
00370       a = nextafter (y, y);
00371       a = nexttoward (y, y);
00372       a = remainder (y, y);
00373       a = scalb (y, (const TYPE) (6));
00374       k = scalbn (y, 7) + scalbln (y, 10l);
00375       i = ilogb (y);
00376       a = fdim (y, y);
00377       a = fmax (y, y);
00378       a = fmin (y, y);
00379       a = fma (y, y, y);
00380 
00381 #ifdef TEST_INT
00382       a = atan2 (i, y);
00383       a = remquo (i, y, &i);
00384       a = fma (i, y, i);
00385       a = pow (i, y);
00386 #endif
00387 
00388       d = cos ((const complex TYPE) z);
00389       d = acos ((const complex TYPE) z);
00390       d = sin ((const complex TYPE) z);
00391       d = asin ((const complex TYPE) z);
00392       d = tan ((const complex TYPE) z);
00393       d = atan ((const complex TYPE) z);
00394       d = cosh ((const complex TYPE) z);
00395       d = acosh ((const complex TYPE) z);
00396       d = sinh ((const complex TYPE) z);
00397       d = asinh ((const complex TYPE) z);
00398       d = tanh ((const complex TYPE) z);
00399       d = atanh ((const complex TYPE) z);
00400       d = exp ((const complex TYPE) z);
00401       d = log ((const complex TYPE) z);
00402       d = sqrt ((const complex TYPE) z);
00403       d = pow ((const complex TYPE) z, (const complex TYPE) z);
00404       d = fabs ((const complex TYPE) z);
00405       d = carg ((const complex TYPE) z);
00406       d = creal ((const complex TYPE) z);
00407       d = cimag ((const complex TYPE) z);
00408       d = conj ((const complex TYPE) z);
00409       d = cproj ((const complex TYPE) z);
00410     }
00411 }
00412 #undef x
00413 #undef y
00414 #undef z
00415 
00416 
00417 TYPE
00418 (F(cos)) (TYPE x)
00419 {
00420   ++count;
00421   P ();
00422   return x;
00423 }
00424 
00425 TYPE
00426 (F(acos)) (TYPE x)
00427 {
00428   ++count;
00429   P ();
00430   return x;
00431 }
00432 
00433 TYPE
00434 (F(sin)) (TYPE x)
00435 {
00436   ++count;
00437   P ();
00438   return x;
00439 }
00440 
00441 TYPE
00442 (F(asin)) (TYPE x)
00443 {
00444   ++count;
00445   P ();
00446   return x;
00447 }
00448 
00449 TYPE
00450 (F(tan)) (TYPE x)
00451 {
00452   ++count;
00453   P ();
00454   return x;
00455 }
00456 
00457 TYPE
00458 (F(atan)) (TYPE x)
00459 {
00460   ++count;
00461   P ();
00462   return x;
00463 }
00464 
00465 TYPE
00466 (F(atan2)) (TYPE x, TYPE y)
00467 {
00468   ++count;
00469   P ();
00470   return x + y;
00471 }
00472 
00473 TYPE
00474 (F(cosh)) (TYPE x)
00475 {
00476   ++count;
00477   P ();
00478   return x;
00479 }
00480 
00481 TYPE
00482 (F(acosh)) (TYPE x)
00483 {
00484   ++count;
00485   P ();
00486   return x;
00487 }
00488 
00489 TYPE
00490 (F(sinh)) (TYPE x)
00491 {
00492   ++count;
00493   P ();
00494   return x;
00495 }
00496 
00497 TYPE
00498 (F(asinh)) (TYPE x)
00499 {
00500   ++count;
00501   P ();
00502   return x;
00503 }
00504 
00505 TYPE
00506 (F(tanh)) (TYPE x)
00507 {
00508   ++count;
00509   P ();
00510   return x;
00511 }
00512 
00513 TYPE
00514 (F(atanh)) (TYPE x)
00515 {
00516   ++count;
00517   P ();
00518   return x;
00519 }
00520 
00521 TYPE
00522 (F(exp)) (TYPE x)
00523 {
00524   ++count;
00525   P ();
00526   return x;
00527 }
00528 
00529 TYPE
00530 (F(log)) (TYPE x)
00531 {
00532   ++count;
00533   P ();
00534   return x;
00535 }
00536 
00537 TYPE
00538 (F(log10)) (TYPE x)
00539 {
00540   ++count;
00541   P ();
00542   return x;
00543 }
00544 
00545 TYPE
00546 (F(ldexp)) (TYPE x, int y)
00547 {
00548   ++count;
00549   P ();
00550   return x + y;
00551 }
00552 
00553 TYPE
00554 (F(frexp)) (TYPE x, int *y)
00555 {
00556   ++count;
00557   P ();
00558   return x + *y;
00559 }
00560 
00561 TYPE
00562 (F(expm1)) (TYPE x)
00563 {
00564   ++count;
00565   P ();
00566   return x;
00567 }
00568 
00569 TYPE
00570 (F(log1p)) (TYPE x)
00571 {
00572   ++count;
00573   P ();
00574   return x;
00575 }
00576 
00577 TYPE
00578 (F(logb)) (TYPE x)
00579 {
00580   ++count;
00581   P ();
00582   return x;
00583 }
00584 
00585 TYPE
00586 (F(exp2)) (TYPE x)
00587 {
00588   ++count;
00589   P ();
00590   return x;
00591 }
00592 
00593 TYPE
00594 (F(log2)) (TYPE x)
00595 {
00596   ++count;
00597   P ();
00598   return x;
00599 }
00600 
00601 TYPE
00602 (F(pow)) (TYPE x, TYPE y)
00603 {
00604   ++count;
00605   P ();
00606   return x + y;
00607 }
00608 
00609 TYPE
00610 (F(sqrt)) (TYPE x)
00611 {
00612   ++count;
00613   P ();
00614   return x;
00615 }
00616 
00617 TYPE
00618 (F(hypot)) (TYPE x, TYPE y)
00619 {
00620   ++count;
00621   P ();
00622   return x + y;
00623 }
00624 
00625 TYPE
00626 (F(cbrt)) (TYPE x)
00627 {
00628   ++count;
00629   P ();
00630   return x;
00631 }
00632 
00633 TYPE
00634 (F(ceil)) (TYPE x)
00635 {
00636   ++count;
00637   P ();
00638   return x;
00639 }
00640 
00641 TYPE
00642 (F(fabs)) (TYPE x)
00643 {
00644   ++count;
00645   P ();
00646   return x;
00647 }
00648 
00649 TYPE
00650 (F(floor)) (TYPE x)
00651 {
00652   ++count;
00653   P ();
00654   return x;
00655 }
00656 
00657 TYPE
00658 (F(fmod)) (TYPE x, TYPE y)
00659 {
00660   ++count;
00661   P ();
00662   return x + y;
00663 }
00664 
00665 TYPE
00666 (F(nearbyint)) (TYPE x)
00667 {
00668   ++count;
00669   P ();
00670   return x;
00671 }
00672 
00673 TYPE
00674 (F(round)) (TYPE x)
00675 {
00676   ++count;
00677   P ();
00678   return x;
00679 }
00680 
00681 TYPE
00682 (F(trunc)) (TYPE x)
00683 {
00684   ++count;
00685   P ();
00686   return x;
00687 }
00688 
00689 TYPE
00690 (F(remquo)) (TYPE x, TYPE y, int *i)
00691 {
00692   ++count;
00693   P ();
00694   return x + y + *i;
00695 }
00696 
00697 long int
00698 (F(lrint)) (TYPE x)
00699 {
00700   ++count;
00701   P ();
00702   return x;
00703 }
00704 
00705 long int
00706 (F(lround)) (TYPE x)
00707 {
00708   ++count;
00709   P ();
00710   return x;
00711 }
00712 
00713 long long int
00714 (F(llrint)) (TYPE x)
00715 {
00716   ++count;
00717   P ();
00718   return x;
00719 }
00720 
00721 long long int
00722 (F(llround)) (TYPE x)
00723 {
00724   ++count;
00725   P ();
00726   return x;
00727 }
00728 
00729 TYPE
00730 (F(erf)) (TYPE x)
00731 {
00732   ++count;
00733   P ();
00734   return x;
00735 }
00736 
00737 TYPE
00738 (F(erfc)) (TYPE x)
00739 {
00740   ++count;
00741   P ();
00742   return x;
00743 }
00744 
00745 TYPE
00746 (F(tgamma)) (TYPE x)
00747 {
00748   ++count;
00749   P ();
00750   return x;
00751 }
00752 
00753 TYPE
00754 (F(lgamma)) (TYPE x)
00755 {
00756   ++count;
00757   P ();
00758   return x;
00759 }
00760 
00761 TYPE
00762 (F(rint)) (TYPE x)
00763 {
00764   ++count;
00765   P ();
00766   return x;
00767 }
00768 
00769 TYPE
00770 (F(nextafter)) (TYPE x, TYPE y)
00771 {
00772   ++count;
00773   P ();
00774   return x + y;
00775 }
00776 
00777 TYPE
00778 (F(nexttoward)) (TYPE x, long double y)
00779 {
00780   ++count;
00781   P ();
00782   return x + y;
00783 }
00784 
00785 TYPE
00786 (F(remainder)) (TYPE x, TYPE y)
00787 {
00788   ++count;
00789   P ();
00790   return x + y;
00791 }
00792 
00793 TYPE
00794 (F(scalb)) (TYPE x, TYPE y)
00795 {
00796   ++count;
00797   P ();
00798   return x + y;
00799 }
00800 
00801 TYPE
00802 (F(scalbn)) (TYPE x, int y)
00803 {
00804   ++count;
00805   P ();
00806   return x + y;
00807 }
00808 
00809 TYPE
00810 (F(scalbln)) (TYPE x, long int y)
00811 {
00812   ++count;
00813   P ();
00814   return x + y;
00815 }
00816 
00817 int
00818 (F(ilogb)) (TYPE x)
00819 {
00820   ++count;
00821   P ();
00822   return x;
00823 }
00824 
00825 TYPE
00826 (F(fdim)) (TYPE x, TYPE y)
00827 {
00828   ++count;
00829   P ();
00830   return x + y;
00831 }
00832 
00833 TYPE
00834 (F(fmin)) (TYPE x, TYPE y)
00835 {
00836   ++count;
00837   P ();
00838   return x + y;
00839 }
00840 
00841 TYPE
00842 (F(fmax)) (TYPE x, TYPE y)
00843 {
00844   ++count;
00845   P ();
00846   return x + y;
00847 }
00848 
00849 TYPE
00850 (F(fma)) (TYPE x, TYPE y, TYPE z)
00851 {
00852   ++count;
00853   P ();
00854   return x + y + z;
00855 }
00856 
00857 complex TYPE
00858 (F(cacos)) (complex TYPE x)
00859 {
00860   ++ccount;
00861   P ();
00862   return x;
00863 }
00864 
00865 complex TYPE
00866 (F(casin)) (complex TYPE x)
00867 {
00868   ++ccount;
00869   P ();
00870   return x;
00871 }
00872 
00873 complex TYPE
00874 (F(catan)) (complex TYPE x)
00875 {
00876   ++ccount;
00877   P ();
00878   return x;
00879 }
00880 
00881 complex TYPE
00882 (F(ccos)) (complex TYPE x)
00883 {
00884   ++ccount;
00885   P ();
00886   return x;
00887 }
00888 
00889 complex TYPE
00890 (F(csin)) (complex TYPE x)
00891 {
00892   ++ccount;
00893   P ();
00894   return x;
00895 }
00896 
00897 complex TYPE
00898 (F(ctan)) (complex TYPE x)
00899 {
00900   ++ccount;
00901   P ();
00902   return x;
00903 }
00904 
00905 complex TYPE
00906 (F(cacosh)) (complex TYPE x)
00907 {
00908   ++ccount;
00909   P ();
00910   return x;
00911 }
00912 
00913 complex TYPE
00914 (F(casinh)) (complex TYPE x)
00915 {
00916   ++ccount;
00917   P ();
00918   return x;
00919 }
00920 
00921 complex TYPE
00922 (F(catanh)) (complex TYPE x)
00923 {
00924   ++ccount;
00925   P ();
00926   return x;
00927 }
00928 
00929 complex TYPE
00930 (F(ccosh)) (complex TYPE x)
00931 {
00932   ++ccount;
00933   P ();
00934   return x;
00935 }
00936 
00937 complex TYPE
00938 (F(csinh)) (complex TYPE x)
00939 {
00940   ++ccount;
00941   P ();
00942   return x;
00943 }
00944 
00945 complex TYPE
00946 (F(ctanh)) (complex TYPE x)
00947 {
00948   ++ccount;
00949   P ();
00950   return x;
00951 }
00952 
00953 complex TYPE
00954 (F(cexp)) (complex TYPE x)
00955 {
00956   ++ccount;
00957   P ();
00958   return x;
00959 }
00960 
00961 complex TYPE
00962 (F(clog)) (complex TYPE x)
00963 {
00964   ++ccount;
00965   P ();
00966   return x;
00967 }
00968 
00969 complex TYPE
00970 (F(csqrt)) (complex TYPE x)
00971 {
00972   ++ccount;
00973   P ();
00974   return x;
00975 }
00976 
00977 complex TYPE
00978 (F(cpow)) (complex TYPE x, complex TYPE y)
00979 {
00980   ++ccount;
00981   P ();
00982   return x + y;
00983 }
00984 
00985 TYPE
00986 (F(cabs)) (complex TYPE x)
00987 {
00988   ++ccount;
00989   P ();
00990   return x;
00991 }
00992 
00993 TYPE
00994 (F(carg)) (complex TYPE x)
00995 {
00996   ++ccount;
00997   P ();
00998   return x;
00999 }
01000 
01001 TYPE
01002 (F(creal)) (complex TYPE x)
01003 {
01004   ++ccount;
01005   P ();
01006   return __real__ x;
01007 }
01008 
01009 TYPE
01010 (F(cimag)) (complex TYPE x)
01011 {
01012   ++ccount;
01013   P ();
01014   return __imag__ x;
01015 }
01016 
01017 complex TYPE
01018 (F(conj)) (complex TYPE x)
01019 {
01020   ++ccount;
01021   P ();
01022   return x;
01023 }
01024 
01025 complex TYPE
01026 (F(cproj)) (complex TYPE x)
01027 {
01028   ++ccount;
01029   P ();
01030   return x;
01031 }
01032 
01033 #undef F
01034 #undef TYPE
01035 #undef count
01036 #undef ccount
01037 #undef TEST_INT
01038 #endif