![]() |
Numerical epsilon value for floating point data types.The Epsilon class is a wrapper class around the functionality of the blaze::Limits class. It represents the smallest difference between two values of any floating point data type. In order to assign an epsilon value, the Epsilon class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle epsilon values conveniently, the global Epsilon instance blaze::epsilon is provided, which can be used wherever a floating point data type is required.
More...
#include <Epsilon.h>
Public Types | |
typedef NegativeEpsilon< Epsilon > | NegativeType |
The negative epsilon type. | |
Public Member Functions | |
Constructor | |
Epsilon () | |
The default constructor of the Epsilon class. | |
Unary plus/minus operators | |
const Epsilon & | operator+ () const |
Returns the positive epsilon value for all floating point data types. More... | |
const NegativeType | operator- () const |
Returns the negative epsilon value for all floating point data types. More... | |
Conversion operators | |
template<typename T > | |
operator const T () const | |
Conversion operator to the required floating point data type. More... | |
Private Member Functions | |
Forbidden operations | |
Epsilon & | operator= (const Epsilon &) |
Copy assignment operator (private & undefined) | |
void * | operator& () const |
Address operator (private & undefined) | |
Numerical epsilon value for floating point data types.
The Epsilon class is a wrapper class around the functionality of the blaze::Limits class. It represents the smallest difference between two values of any floating point data type. In order to assign an epsilon value, the Epsilon class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle epsilon values conveniently, the global Epsilon instance blaze::epsilon is provided, which can be used wherever a floating point data type is required.
|
inline |
Conversion operator to the required floating point data type.
The conversion operator returns the smallest possible difference between values of the floating point data type T.
|
inline |
Returns the positive epsilon value for all floating point data types.
|
inline |
Returns the negative epsilon value for all floating point data types.