Main Page | Alphabetical List | Class List | File List | Class Members | File Members

tgmath.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------------------------
00002  * /
00003  * / apeNEXT tgmath functions for nlcc
00004  * /
00005  * / $Id: tgmath.h,v 1.11 2005/06/08 14:06:53 pleiter Exp $
00006  * /
00007  * /
00008  * / ISO/IEC 9899:1999 (E) Standard
00009  * / Type generic math macros  <tgmath.h>
00010  * /
00011  * /
00012  * / Author: Olaf Kaczmarek (okacz@physik.uni-bielefeld.de)
00013  * /
00014  * / IMPLEMENTATION for APEnext: done, needs to be tested    (tgmath.h)
00015  * /-------------------------------------------------------------------------------------------*/
00016 
00017 #ifndef _TGMATH_H
00018 #define _TGMATH_H
00019 
00020 #include <nlibc.h>
00021 
00022 /* Include the needed headers.  */
00023 #include <math.h>
00024 #include <complex.h>
00025 
00026 #define exp(Val)   ((__typecode(Val)==3) ? cexp(Val) :   exp(Val))
00027 #define acos(Val)  ((__typecode(Val)==3) ? cacos(Val) :  acos(Val))
00028 #define asin(Val)  ((__typecode(Val)==3) ? casin(Val) :  asin(Val))
00029 #define atan(Val)  ((__typecode(Val)==3) ? catan(Val) :  atan(Val))
00030 #define acosh(Val) ((__typecode(Val)==3) ? cacosh(Val) : acosh(Val))
00031 #define asinh(Val) ((__typecode(Val)==3) ? casinh(Val) : asinh(Val))
00032 #define atanh(Val) ((__typecode(Val)==3) ? catanh(Val) : atanh(Val))
00033 #define cos(Val)   ((__typecode(Val)==3) ? ccos(Val) :   cos(Val))
00034 #define sin(Val)   ((__typecode(Val)==3) ? csin(Val) :   sin(Val))
00035 #define tan(Val)   ((__typecode(Val)==3) ? ctan(Val) :   tan(Val))
00036 #define cosh(Val)  ((__typecode(Val)==3) ? ccosh(Val) :  cosh(Val))
00037 #define sinh(Val)  ((__typecode(Val)==3) ? csinh(Val) :  sinh(Val))
00038 #define tanh(Val)  ((__typecode(Val)==3) ? ctanh(Val) :  tanh(Val))
00039 #define exp(Val)   ((__typecode(Val)==3) ? cexp(Val) :   exp(Val))
00040 #define log(Val)   ((__typecode(Val)==3) ? clog(Val) :   log(Val))
00041 #define pow(Val)   ((__typecode(Val)==3) ? cpow(Val) :   pow(Val))
00042 #define sqrt(Val)  ((__typecode(Val)==3) ? csqrt(Val) :  sqrt(Val))
00043 #define fabs(Val)  ((__typecode(Val)==3) ? cabs(Val) :   fabs(Val))
00044 
00045 
00046 #endif /* ifndef _TGMATH_H  */
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 

Generated on Fri Jul 14 10:51:32 2006 for nlibc by doxygen 1.3.5