Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

Basic mathematic functions


Functions

double CTBsqrt (double x)
float CTBsqrt (float x)
double CTBexp (double x)
float CTBexp (float x)
double CTBlog (double x)
float CTBlog (float x)
double CTBlog10 (double x)
float CTBlog10 (float x)
double CTBasin (double x)
float CTBasin (float x)
double CTBacos (double x)
float CTBacos (float x)
double CTBpow (double x, int i_y)
float CTBpow (float x, int i_y)
CTBint CTBilog2 (CTBint ix)
double CTBpythag (double x, double y)
float CTBpythag (float x, float y)
double CTBsin (double x)
float CTBsin (float x)
double CTBcos (double x)
float CTBcos (float x)
double CTBtan (double x)
float CTBtan (float x)
double CTBatan (double x)
float CTBatan (float x)
double CTBacos2 (double y, double x)
float CTBacos2 (float y, float x)
double CTBatan2 (double y, double x)
float CTBatan2 (float y, float x)
double CTBsinh (double x)
float CTBsinh (float x)
double CTBcosh (double x)
float CTBcosh (float x)
double CTBtanh (double x)
float CTBtanh (float x)
double CTBasinh (double x)
float CTBasinh (float x)
double CTBacosh (double x)
float CTBacosh (float x)
double CTBatanh (double x)
float CTBatanh (float x)
double CTBpow (double x, double y)
float CTBpow (float x, float y)
template<class T> T CTBpow2 (T x)
template<class T> T CTBpow3 (T x)
template<class T> T CTBpow4 (T x)
double CTBerf (double x)
float CTBerf (float x)

Function Documentation

double CTBsqrt double x
 

Returns sqrt(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x negative.

Definition at line 34 of file CTBmath.cxx.

float CTBsqrt float x
 

Returns sqrt(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x negative.

Definition at line 53 of file CTBmath.cxx.

double CTBexp double x
 

Returns exp(x).

Exceptions:
CTBexceptioMathRange   Thrown if exp(x) too large a number

Definition at line 72 of file CTBmath.cxx.

float CTBexp float x
 

Returns exp(x).

Exceptions:
CTBexceptioMathRange   Thrown if exp(x) too large a number

Definition at line 91 of file CTBmath.cxx.

double CTBlog double x
 

Returns log(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x is negative
CTBexceptioMathRange   Thrown if x is zero

Definition at line 111 of file CTBmath.cxx.

float CTBlog float x
 

Returns log(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x is negative
CTBexceptioMathRange   Thrown if x is zero

Definition at line 132 of file CTBmath.cxx.

double CTBlog10 double x
 

Returns log10(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x is negative
CTBexceptioMathRange   Thrown if x is zero

Definition at line 153 of file CTBmath.cxx.

float CTBlog10 float x
 

Returns log10(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x is negative
CTBexceptioMathRange   Thrown if x is zero

Definition at line 174 of file CTBmath.cxx.

double CTBasin double x
 

Returns asin(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x out of [-1,+1] .

Definition at line 194 of file CTBmath.cxx.

float CTBasin float x
 

Returns asin(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x out of [-1,+1] .

Definition at line 213 of file CTBmath.cxx.

double CTBacos double x
 

Returns acos(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x out of [-1,+1] .

Definition at line 232 of file CTBmath.cxx.

float CTBacos float x
 

Returns acos(x).

Exceptions:
CTBexceptioMathDomain   Thrown if x out of [-1,+1] .

Definition at line 251 of file CTBmath.cxx.

double CTBpow double x,
int i_y
 

Returns x raised to the power of i_y .

Definition at line 267 of file CTBmath.cxx.

float CTBpow float x,
int i_y
 

Returns x raised to the power of i_y .

Definition at line 284 of file CTBmath.cxx.

CTBint CTBilog2 CTBint ix
 

Returns log_2 of the integer ix or -1 if x not power of 2.

Definition at line 301 of file CTBmath.cxx.

double CTBpythag double x,
double y
 

Returns sqrt(x*x+y*y).

Implementation Notes:
A straight forward implementation like sqrt(x*x+y*y) can produce an overflow in the calculation of x*x even though the final result is perfectly in range. This implementation gives correct results for almost the full range of inputs, at the cost of an additional division and a few comparisons.

Definition at line 327 of file CTBmath.cxx.

float CTBpythag float x,
float y
 

Returns sqrt(x*x+y*y).

Definition at line 356 of file CTBmath.cxx.

double CTBsin double x [inline]
 

Returns sin(x).

Definition at line 24 of file CTBmath.icc.

float CTBsin float x [inline]
 

Returns sin(x).

Definition at line 32 of file CTBmath.icc.

Referenced by sincos().

double CTBcos double x [inline]
 

Returns cos(x).

Definition at line 40 of file CTBmath.icc.

float CTBcos float x [inline]
 

Returns cos(x).

Definition at line 48 of file CTBmath.icc.

Referenced by sincos().

double CTBtan double x [inline]
 

Returns tan(x).

Definition at line 56 of file CTBmath.icc.

float CTBtan float x [inline]
 

Returns tan(x).

Definition at line 64 of file CTBmath.icc.

double CTBatan double x [inline]
 

Returns atan(x).

Definition at line 72 of file CTBmath.icc.

float CTBatan float x [inline]
 

Returns atan(x).

Definition at line 80 of file CTBmath.icc.

double CTBacos2 double y,
double x
[inline]
 

Returns acos(y/x).

This protected variant of acos is convenient in cartesian to polar coordinate conversions and often used in conjunction with CTBatan2(). It returns:

  • acos(y/x) in case x!=0 and if y/x is in [-1.,+1] .
  • +pi/2 or -pi/2 in case x==0. The sign depends on the sign of y .
  • +pi/2 if y/x is larger than +1.
  • -pi/2 if y/x is smaller than -1.

Definition at line 96 of file CTBmath.icc.

float CTBacos2 float y,
float x
[inline]
 

Returns acos(y/x).

This protected variant of acos is convenient in cartesian to polar coordinate conversions and often used in conjunction with CTBatan2(). It returns:

  • acos(y/x) in case x!=0 and if y/x is in [-1.,+1] .
  • +pi/2 or -pi/2 in case x==0. The sign depends on the sign of y .
  • +pi/2 if y/x is larger than +1.
  • -pi/2 if y/x is smaller than -1.

Definition at line 115 of file CTBmath.icc.

double CTBatan2 double y,
double x
[inline]
 

Returns atan2(x).

Definition at line 126 of file CTBmath.icc.

float CTBatan2 float y,
float x
[inline]
 

Returns atan2(x).

Definition at line 134 of file CTBmath.icc.

double CTBsinh double x [inline]
 

Returns sinh(x).

Definition at line 142 of file CTBmath.icc.

float CTBsinh float x [inline]
 

Returns sinh(x).

Definition at line 150 of file CTBmath.icc.

double CTBcosh double x [inline]
 

Returns cosh(x).

Definition at line 158 of file CTBmath.icc.

float CTBcosh float x [inline]
 

Returns cosh(x).

Definition at line 166 of file CTBmath.icc.

double CTBtanh double x [inline]
 

Returns tanh(x).

Definition at line 174 of file CTBmath.icc.

float CTBtanh float x [inline]
 

Returns tanh(x).

Definition at line 182 of file CTBmath.icc.

double CTBasinh double x [inline]
 

Returns asinh(x).

Definition at line 190 of file CTBmath.icc.

float CTBasinh float x [inline]
 

Returns asinh(x).

Definition at line 198 of file CTBmath.icc.

double CTBacosh double x [inline]
 

Returns acosh(x).

Definition at line 206 of file CTBmath.icc.

float CTBacosh float x [inline]
 

Returns acosh(x).

Definition at line 214 of file CTBmath.icc.

double CTBatanh double x [inline]
 

Returns atanh(x).

Definition at line 222 of file CTBmath.icc.

float CTBatanh float x [inline]
 

Returns atanh(x).

Definition at line 230 of file CTBmath.icc.

double CTBpow double x,
double y
[inline]
 

Returns x raised to the power of y .

Exceptions:
CTBexceptioMathDomain   Thrown if x negative.

Definition at line 240 of file CTBmath.icc.

float CTBpow float x,
float y
[inline]
 

Returns x raised to the power of y .

Exceptions:
CTBexceptioMathDomain   Thrown if x negative.

Definition at line 250 of file CTBmath.icc.

template<class T>
T CTBpow2 T x [inline]
 

Returns the second power of x .

Definition at line 259 of file CTBmath.icc.

Referenced by CTBcomplex::Acos(), CTBcomplex::Acosh(), CTBcomplex::Asin(), and CTBcomplex::Asinh().

template<class T>
T CTBpow3 T x [inline]
 

Returns the third power of x .

Definition at line 271 of file CTBmath.icc.

template<class T>
T CTBpow4 T x [inline]
 

Returns the fourth power of x .

Definition at line 283 of file CTBmath.icc.

double CTBerf double x [inline]
 

Returns erf(x).

Definition at line 295 of file CTBmath.icc.

float CTBerf float x [inline]
 

Returns erf(x).

Definition at line 303 of file CTBmath.icc.


Generated at Fri Oct 24 18:14:16 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001