All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
Aux::NumericTools Namespace Reference

Tools to deal with limited precision in numeric computations. More...

Functions

bool equal (double x, double y, double error=acceptableError)
 Test doubles for equality within a given error. More...
 
bool le (double x, double y, double error=acceptableError)
 Test doubles for equality within a given error. More...
 
bool ge (double x, double y, double error=acceptableError)
 Test doubles for equality within a given error. More...
 
bool logically_equal (double a, double b, double error_factor=1.0)
 Test doubles for equality within the smallest possible error. More...
 
template<typename T >
bool willOverflow (const T &pX, const T &pValue, const T &pMax=std::numeric_limits< T >::max())
 
template<typename T >
bool willUnderflow (const T &pX, const T &pValue, const T &pMin=std::numeric_limits< T >::min())
 

Detailed Description

Tools to deal with limited precision in numeric computations.

Function Documentation

bool Aux::NumericTools::equal ( const double  x,
const double  y,
const double  error 
)

Test doubles for equality within a given error.

bool Aux::NumericTools::ge ( const double  x,
const double  y,
const double  error 
)

Test doubles for equality within a given error.

bool Aux::NumericTools::le ( const double  x,
const double  y,
const double  error 
)

Test doubles for equality within a given error.

bool Aux::NumericTools::logically_equal ( double  a,
double  b,
double  error_factor 
)

Test doubles for equality within the smallest possible error.

template<typename T >
bool Aux::NumericTools::willOverflow ( const T &  pX,
const T &  pValue,
const T &  pMax = std::numeric_limits<T>::max() 
)
template<typename T >
bool Aux::NumericTools::willUnderflow ( const T &  pX,
const T &  pValue,
const T &  pMin = std::numeric_limits<T>::min() 
)