Hermes
|
Represents a value with error bounds. More...
Public Member Functions | |
HERMES_DEVICE_CALLABLE | EFloat () |
Default constructor. | |
HERMES_DEVICE_CALLABLE | EFloat (f32 v, f32 e=0.f) |
Constructs from value and error size. More... | |
HERMES_DEVICE_CALLABLE | operator float () const |
Casts to 32 bit floating point. More... | |
HERMES_DEVICE_CALLABLE | operator double () const |
Casts to 64 bit floating point. More... | |
HERMES_DEVICE_CALLABLE EFloat | operator+ (EFloat f) const |
HERMES_DEVICE_CALLABLE EFloat | operator- (EFloat f) const |
HERMES_DEVICE_CALLABLE EFloat | operator* (EFloat f) const |
HERMES_DEVICE_CALLABLE EFloat | operator/ (EFloat f) const |
HERMES_DEVICE_CALLABLE bool | operator== (EFloat f) const |
HERMES_DEVICE_CALLABLE f32 | absoluteError () const |
Computes the absolute error carried by this number. More... | |
HERMES_DEVICE_CALLABLE f32 | upperBound () const |
Computes the upper error bound carried by this number. More... | |
HERMES_DEVICE_CALLABLE f32 | lowerBound () const |
Computes the lower error bound carried by this number. More... | |
Friends | |
HERMES_DEVICE_CALLABLE friend EFloat | operator* (f32 f, EFloat fe) |
HERMES_DEVICE_CALLABLE friend EFloat | operator/ (f32 f, EFloat fe) |
HERMES_DEVICE_CALLABLE friend EFloat | operator+ (f32 f, EFloat fe) |
HERMES_DEVICE_CALLABLE friend EFloat | operator- (f32 f, EFloat fe) |
Represents a value with error bounds.
Implements the running error analysis by carrying the error bounds accumulated by a floating point value. It keeps track of the interval of uncertainty of the computed value.
|
inlineexplicit |
Constructs from value and error size.
v | floating point value |
e | absolute error bound |
|
inline |
Computes the absolute error carried by this number.
|
inline |
Computes the lower error bound carried by this number.
|
inlineexplicit |
Casts to 64 bit floating point.
|
inlineexplicit |
Casts to 32 bit floating point.
|
inline |
Computes the upper error bound carried by this number.