Public Types | List of all members
blaze::Accuracy Class Reference

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 Accuracyoperator+ () 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
Accuracyoperator= (const Accuracy &)=delete
 
void * operator & () const =delete
 

Detailed Description

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.

float f = accuracy; // Assigns the positive computation accuracy for single precision values
double d = -accuracy; // Assigns the negative computation accuracy for double precision values

Member Function Documentation

◆ operator const T()

template<typename T >
constexpr blaze::Accuracy::operator const T ( ) const
inline

Conversion operator to the required floating point data type.

The conversion operator returns the computation accuracy for the floating point data type T.

◆ operator+()

constexpr const Accuracy & blaze::Accuracy::operator+ ( ) const
inline

Returns the positive computation accuracy for all floating point data types.

Returns
The positive computation accuracy.

◆ operator-()

constexpr const Accuracy::NegativeType blaze::Accuracy::operator- ( ) const
inline

Returns the negative computation accuracy for all floating point data types.

Returns
The negative computation accuracy.

The documentation for this class was generated from the following file: