#include <gul_types.h>
Static Public Methods | |
| double | epsilon () |
| double | epsilon_inv () |
| double | zero_tol () |
| size_t | mantissa_length () |
| double | maximum () |
| double | minimum () |
| double | pi () |
| double | pi_180 () |
| double | pi_180_inv () |
| double | root2_2 () |
| double | root2_3 () |
| double | golden_r () |
| double | golden_c () |
| double | tiny () |
| double | giant () |
| float | zero () |
| float | one () |
| void | InitBinCoeff (const int Pmax) |
| void | ExitBinCoeff () |
| double | BinCoeff (const int p, const int k) |
| double | floor (const double a) |
| double | ceil (const double a) |
| double | fabs (const double a) |
| double | sqrt (const double a) |
| double | sin (const double a) |
| double | cos (const double a) |
| double | acos (const double a) |
| int | ilogb (const double a) |
| double | scalbn (const double x, int n) |
| double | rad (const double d) |
| double | deg (const double r) |
| int | cmp (const double a, const double b) |
| int | id () |
Static Public Attributes | |
| double ** | m_BinCoeff = 0 |
| int | m_BinCoeff_Pmax = -1 |
|
|
Definition at line 276 of file gul_types.h.
00276 { return ::acos(a); }
|
|
||||||||||||
|
Definition at line 264 of file gul_types.h.
00265 {
00266 if( (k > p) || (k < 0) || (p < 0) ) return 0.0f;
00267 if( p > m_BinCoeff_Pmax ) InitBinCoeff( p );
00268 return m_BinCoeff[p][k];
00269 }
|
|
|
Definition at line 271 of file gul_types.h.
00271 { return ::ceil(a); }
|
|
||||||||||||
|
Definition at line 283 of file gul_types.h.
00283 {return compare<double>(a,b);}
|
|
|
Definition at line 275 of file gul_types.h.
00275 { return ::cos(a); }
|
|
|
Definition at line 282 of file gul_types.h.
00282 { return r * pi_180_inv(); }
|
|
|
Definition at line 235 of file gul_types.h.
00235 { return DBL_EPSILON; }
|
|
|
Definition at line 236 of file gul_types.h.
00236 { return 1.0/DBL_EPSILON; }
|
|
|
Definition at line 109 of file guar_bincoeff.cpp.
00110 {
00111 int i;
00112
00113 if( m_BinCoeff == 0 )
00114 return;
00115
00116 for( i = 0; i <= m_BinCoeff_Pmax; i++ )
00117 free( m_BinCoeff[i] );
00118
00119 free( m_BinCoeff );
00120
00121 m_BinCoeff = 0;
00122 m_BinCoeff_Pmax = -1;
00123 }
|
|
|
Definition at line 272 of file gul_types.h.
00272 { return ::fabs(a); }
|
|
|
Definition at line 270 of file gul_types.h.
00270 { return ::floor(a); }
|
|
|
Definition at line 251 of file gul_types.h.
00251 { return 1.0f/tiny(); }
|
|
|
Definition at line 247 of file gul_types.h.
00247 { return 1.0-golden_r(); }
|
|
|
Definition at line 246 of file gul_types.h.
00246 { return 0.61803399; }
|
|
|
Definition at line 285 of file gul_types.h.
00285 { return(2); }
|
|
|
Definition at line 278 of file gul_types.h.
00278 { return ::ilogb(a); }
|
|
|
Definition at line 131 of file guar_bincoeff.cpp.
00132 {
00133 double s1,s2;
00134 int p,k;
00135
00136 if( Pmax <= m_BinCoeff_Pmax )
00137 return;
00138
00139 m_BinCoeff = (double **)realloc( m_BinCoeff, sizeof(double *) * (Pmax+1) );
00140 if( m_BinCoeff == NULL ) { throw AllocError(); }
00141
00142 for( p = m_BinCoeff_Pmax+1; p <= Pmax; p++ )
00143 {
00144 m_BinCoeff[p] = (double *)malloc( sizeof(double) * (p+1) );
00145 if( m_BinCoeff[p] == 0 ) { throw AllocError(); }
00146
00147 if( p == 0 )
00148 {
00149 m_BinCoeff[0][0] = 1;
00150 continue;
00151 }
00152
00153 for( k = 0; k <= p; k++ )
00154 {
00155 if( k == 0 )
00156 s1 = 0;
00157 else
00158 s1 = m_BinCoeff[p-1][k-1];
00159
00160 if( k > p-1 )
00161 s2 = 0;
00162 else
00163 s2 = m_BinCoeff[p-1][k];
00164
00165 m_BinCoeff[p][k] = s1 + s2;
00166 }
00167 }
00168 m_BinCoeff_Pmax = Pmax;
00169 }
|
|
|
Definition at line 238 of file gul_types.h.
00238 { return 8; } // in multiples of 4
|
|
|
Definition at line 239 of file gul_types.h.
00239 { return DBL_MAX; }
|
|
|
Definition at line 240 of file gul_types.h.
00240 { return DBL_MIN; }
|
|
|
Definition at line 258 of file gul_types.h.
00258 { return 1.0; }
|
|
|
Definition at line 241 of file gul_types.h.
00241 { return 3.14159265358979323846; }
|
|
|
Definition at line 242 of file gul_types.h.
00242 { return 3.14159265358979323846/180.0; }
|
|
|
Definition at line 243 of file gul_types.h.
00243 { return 180.0/3.14159265358979323846; }
|
|
|
Definition at line 281 of file gul_types.h.
00281 { return d * pi_180(); }
|
|
|
Definition at line 244 of file gul_types.h.
00244 { return 1.41421356237309514547; }
|
|
|
Definition at line 245 of file gul_types.h.
00245 { return 1.7320508076887719318; }
|
|
||||||||||||
|
Definition at line 279 of file gul_types.h.
00279 { return ::scalbn(x,n); }
|
|
|
Definition at line 274 of file gul_types.h.
00274 { return ::sin(a); }
|
|
|
Definition at line 273 of file gul_types.h.
00273 { return ::sqrt(a); }
|
|
|
Definition at line 250 of file gul_types.h.
00250 { return 1e-40; }
|
|
|
Definition at line 257 of file gul_types.h.
00257 { return 0.0; }
|
|
|
Definition at line 237 of file gul_types.h.
00237 { return 1.0e-9; }
|
|
|
Definition at line 28 of file guar_bincoeff.cpp. |
|
|
Definition at line 29 of file guar_bincoeff.cpp. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001