Theoretica
A C++ numerical and automatic mathematical library
|
Error handling. More...
Go to the source code of this file.
Namespaces | |
theoretica | |
Main namespace of the library which contains all functions and objects. | |
Macros | |
#define | TH_MATH_ERROR(F_NAME, VALUE, EXCEPTION) { errno = th_errcode_to_errno(EXCEPTION); } |
TH_MATH_ERROR is a macro which throws exceptions or modifies errno (depending on which compiling options are defined) | |
#define | TH_DEBUG(VARIABLE) |
Enumerations | |
enum | theoretica::MATH_ERRCODE { NO_ERROR = 0x00 , DIV_BY_ZERO = 0x01 , OUT_OF_DOMAIN = 0x02 , OUT_OF_RANGE = 0x04 , IMPOSSIBLE_OPERATION = 0x08 , NO_ALGO_CONVERGENCE = 0x10 , INVALID_ARGUMENT = 0x20 } |
Math error enumeration. | |
Functions | |
int | theoretica::th_errcode_to_errno (MATH_ERRCODE err) |
Convert a MATH_ERRCODE to errno error codes. | |
real | theoretica::nan () |
Return a quiet NaN number in floating point representation. | |
template<typename T > | |
bool | theoretica::is_nan (const T &x) |
Check whether a generic variable is (equivalent to) a NaN number. More... | |
real | theoretica::inf () |
Return positive infinity in floating point representation. | |
Error handling.
#define TH_DEBUG | ( | VARIABLE | ) |