Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

spuc.h

Go to the documentation of this file.
00001 
00120 
00121 
00122 
00123 namespace SPUC {
00127 #ifndef MYINCLUDE
00128 #define MYINCLUDE
00129 #define MAXINT  32767
00130 #define MXLONG 4294967295
00131 #define BIG     72057594037927936.              // Maximum precision of DOUBLE */
00132 #define HUGED   1.701411733192644270e38         // Largest DOUBLE */
00133 #define LOGHUGE 39                              // 10^39 --> Largest power */
00134 #define LN2     0.69314718055994530941
00135 #define ILN2    1.4426950408889634 // 1/LN2
00136 #define LN10    2.30258509299404568401
00137 #define E       2.7182818284590452353602874
00138 #define SQRT2   1.41421356237309504880
00139 #define HALFSQRT2       .70710678118654752440
00140 #ifndef PI
00141 #define PI      3.141592653589793238462643
00142 #endif
00143 //#define pi PI
00144 #define QUARTPI 0.78539816339744830962
00145 #define HALFPI  1.57079632679489661923
00146 #define TWOPI   6.28318530717958647692
00147 #define RADPDEG 0.01745329251994329576
00148 #define RTD  57.295781  // radian to decimal conversion factor 
00149 
00150 // macros 
00151 
00152 #define SQR(x)  ((x) * (x))
00153 #define SGN(x)  ((x) < 0 ? -1 : 1)
00154 #define XSWAP(a,b) a ^= b, b ^= a, a ^= b
00155 #define SWAP(a,b,c) c = a, a = b, b = c
00156 #ifndef MAX
00157 #define MAX(x,y)        ((x) >= (y) ? (x) : (y))
00158 #endif
00159 #ifndef MIN
00160 #define MIN(x,y)        ((x) <= (y) ? (x) : (y))
00161 #endif
00162 #ifndef ABS
00163 #define ABS(x) ( (x < 0) ? (-x) : (x))
00164 #endif
00165 //#define abs(x)                ((x)<0? -(x):(x))       // Integer Absolute value */
00166 //#define fabs(x)       ((x)<0.? -(x):(x))      // Floating absolute value */
00167 #define MODULO(x,y)     ((x)%(y))               //  Integer modulo */
00168 #define LOGE(x)         (log(x))                // Natural log */
00169 #define LN(x)           (log(x))                // Natural log */
00170 #define MASK_LOW(n)     ((1<<n) - 1)
00171 #define MASK_BIT(n) (1<<n)
00172 #define MASK_NEG_HI(n)  (-1<<(32-n))
00173 #define CLIP(A,B,C) (A>B) ? B : ((A<C) ? C : A)
00174 typedef long natural;
00175 #endif
00176 // End of spuc.h 
00177 }

Generated on Fri Sep 16 11:02:28 2005 for spuc by  doxygen 1.4.4