E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches
Accuracy helpers

Detailed Description

These functions allows performing some basic arithmetics operations with greater accuracy even when a truly upgraded type is not available.

diff_of_prod, safe_scale, sufp, sulp, sum_of_prod, three_fma, two_add, two_prod, two_sub, veltkamp.

Note
Many functions can also use a widen decorators. This make the whole computation and result made in the upgraded type if available. Currently types with 64 bits elements cannot be upgraded and for then widen has no effect.

Variables

constexpr auto eve::diff_of_prod = functor<diff_of_prod_t>
 elementwise_callable object computing the difference of products operation with better accuracy than the naive formula.
 
constexpr auto eve::safe_scale = functor<safe_scale_t>
 elementwise_callable object computing underflow-safe and almost overflow-free scaling factor for the input.
 
constexpr auto eve::sufp = functor<sufp_t>
 elementwise_callable object computing the signed unit value in the first place of the input i.e. the greatest integer power of 2 less than or equal to |x|, multiplied by the sign of x.
 
constexpr auto eve::sulp = functor<sulp_t>
 elementwise_callable object computing the classical unit in the last place (Kahan) or the harrisson version multiplied by the sign of the input.
 
constexpr auto eve::sum_of_prod = functor<sum_of_prod_t>
 elementwise_callable object computing the sum of products operation with better accuracy than the naive formula.
 
constexpr auto eve::three_fma = functor<three_fma_t>
 Computes the elementwise triplet of an fma value f and two errors e1 and e2 such that \(ax+y = f+r_1+r_2\).
 
constexpr auto eve::two_add = functor<two_add_t>
 Computes the elementwise pair consisting of the sum and its resulting rounding error.
 
constexpr auto eve::two_prod = functor<two_prod_t>
 Computes the elementwise pair of product and error,.