Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::NaturalPositRefinement< m > Struct Template Reference

Natural refinement: uses the Kolmogorov mean derived from the cumulative distribution function of the number system. More...

#include <generators.hpp>

Public Member Functions

template<typename R>
R operator() (const R &a, const R &b) const

Detailed Description

template<unsigned m = 0>
struct sw::universal::NaturalPositRefinement< m >

Natural refinement: uses the Kolmogorov mean derived from the cumulative distribution function of the number system.

For posits, this eliminates wobbling accuracy by providing a smooth mapping from bit strings to reals.

The natural refinement for a power mean M_p is: f(a, b) = M_p(a, b) = ((a^p + b^p) / 2)^(1/p) For Posit(m), p = -2^(-m).

Member Function Documentation

◆ operator()()

template<unsigned m = 0>
template<typename R>
R sw::universal::NaturalPositRefinement< m >::operator() ( const R & a,
const R & b ) const
inline

The documentation for this struct was generated from the following file:
  • /home/runner/work/universal/universal/include/sw/universal/number/bisection/generators.hpp