Theoretica
Mathematical Library
Loading...
Searching...
No Matches
error.h File Reference

Error handling. More...

#include <cerrno>
#include <limits>
#include "./constants.h"

Go to the source code of this file.

Namespaces

namespace  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)
 

Enumerations

enum  theoretica::MATH_ERRCODE
 Math error enumeration.
 

Functions

int theoretica::th_errcode_to_errno (MATH_ERRCODE err)
 Convert a MATH_ERRCODE to errno error codes.
 
TH_CONSTEXPR 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.
 
TH_CONSTEXPR real theoretica::inf ()
 Get positive infinity in floating point representation.
 
bool theoretica::is_inf (real x)
 Check whether a real number is infinite.
 

Detailed Description

Error handling.