eb
compression_safeguards.safeguards.eb
Error bounds that can be guaranteed by various safeguards.
Classes:
-
ErrorBound–Different types of error bounds that can be guaranteed by various
ErrorBound
Bases: Enum
Different types of error bounds that can be guaranteed by various safeguards, including:
ErrorBoundSafeguardPointwiseQuantityOfInterestErrorBoundSafeguardStencilQuantityOfInterestErrorBoundSafeguard
abs
class-attribute
instance-attribute
abs = auto()
Absolute error bound, which guarantees that the pointwise absolute error is less than or equal to the provided bound \(\epsilon_{abs}\):
or equivalently
for a finite \(\epsilon_{abs} \geq 0\).
rel
class-attribute
instance-attribute
rel = auto()
Relative error bound, which guarantees that the pointwise relative error is less than or equal to the provided bound \(\epsilon_{rel}\):
or equivalently
for a finite \(\epsilon_{rel} \geq 0\).
The relative error bound preserves zero values with the same bit pattern.
ratio
class-attribute
instance-attribute
ratio = auto()
Ratio error bound, which guarantees that the ratios between the original and the corrected values as well as their inverse ratios are less than or equal to the provided bound \(\epsilon_{ratio}\):
or equivalently
for a finite \(\epsilon_{ratio} \geq 1\).
Since the \(\epsilon_{ratio}\) bound is finite, ratio error bound also guarantees that the sign of each corrected value matches the sign of each original value and that a corrected value is zero if and only if it is zero in the original data.
The ratio error bound is sometimes also known as a decimal error bound1 2 if the ratio is expressed as the difference in orders of magnitude. A decimal error bound of e.g. \(2\) (two orders of magnitude difference / x100 ratio) can be expressed using \(\epsilon_{ratio} = {10}^{\epsilon_{decimal}}\).
The ratio error bound can also be used to guarantee a relative-like error bound, e.g. \(\epsilon_{ratio} = 1.02\) corresponds to a \(2\%\) relative-like error bound.
-
Gustafson, J. L., & Yonemoto, I. T. (2017). Beating floating-point at its Own Game: Posit Arithmetic. Supercomputing Frontiers and Innovations, 4(2). Available from: doi:10.14529/jsfi170206. ↩
-
Klöwer, M., Düben, P. D., & Palmer, T. N. (2019). Posits as an alternative to floats for weather and climate models. CoNGA'19: Proceedings of the Conference for Next Generation Arithmetic 2019, 1-8. Available from: doi:10.1145/3316279.3316281. ↩