![]() |
Computation accuracy for floating point data types.The Accuracy class is a wrapper class around the functionality of the blaze::Limits class. It represents the computation accuracy of the Blaze library for any floating point data type. In order to assign an accuracy value, the Accuracy class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle accuracy values conveniently, the global Accuracy instance blaze::accuracy is provided, which can be used wherever a floating point data value is required.
More...
#include <Accuracy.h>
Public Types | |
using | NegativeType = NegativeAccuracy< Accuracy > |
The negated accuracy type. | |
Public Member Functions | |
Constructors | |
constexpr | Accuracy () |
The default constructor of the Accuracy class. | |
Accuracy (const Accuracy &)=default | |
Destructor | |
~Accuracy ()=default | |
Unary plus/minus operators | |
constexpr const Accuracy & | operator+ () const |
Returns the positive computation accuracy for all floating point data types. More... | |
constexpr const NegativeType | operator- () const |
Returns the negative computation accuracy for all floating point data types. More... | |
Conversion operator | |
template<typename T > | |
constexpr | operator const T () const |
Conversion operator to the required floating point data type. More... | |
Forbidden operations | |
Accuracy & | operator= (const Accuracy &)=delete |
void * | operator & () const =delete |
Computation accuracy for floating point data types.
The Accuracy class is a wrapper class around the functionality of the blaze::Limits class. It represents the computation accuracy of the Blaze library for any floating point data type. In order to assign an accuracy value, the Accuracy class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle accuracy values conveniently, the global Accuracy instance blaze::accuracy is provided, which can be used wherever a floating point data value is required.
|
inline |
Conversion operator to the required floating point data type.
The conversion operator returns the computation accuracy for the floating point data type T.
|
inline |
Returns the positive computation accuracy for all floating point data types.
|
inline |
Returns the negative computation accuracy for all floating point data types.