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

Additional Arithmetic


Functions

double simth::arg (const Complex &comp)
int simth::inversePower2 (int x)
double simth::db2linearPowerRatio (double snr)
double simth::db2reciprocalLinearPowerRatio (double snr)

Function Documentation

double arg const Complex comp  ) 
 

Returns the argument (phase) of the given complex number in the range from 0 to 2pi. Note that the corresponging function of the standard library returns the argument in the range from -pi to pi.

int inversePower2 int  x  ) 
 

Returns $ \log_2(x)$ if the given integer argument x is a power to 2, i.e. $x=2^y$ where y is an integer value (actually it is the return value). If the integer argument x is not a power to two, the function throws an std::runtime_error.

double db2linearPowerRatio double  snr  )  [inline]
 

Returns the linear power ratio for the power ratio given in dB as argument: $ r_{lin} = 10^{r_{dB}/10}$.

double db2reciprocalLinearPowerRatio double  snr  )  [inline]
 

Returns the inverse linear power ratio for the power ratio given in dB as argument: $ 1/r_{lin} = 1/10^{r_{dB}/10} = 10^{-r_{dB}/10} $ .


Generated on Mon Apr 24 21:19:19 2006 for simthetic by  doxygen 1.4.1