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::LNSGenerator< m > Struct Template Reference

LNS(m): Logarithmic number system with m-bit exponent. More...

#include <generators.hpp>

Public Member Functions

template<typename R>
R operator() (const R &x) const

Static Public Attributes

static constexpr double scale_d = static_cast<double>(uint64_t(1) << (uint64_t(1) << (m - 1)))

Detailed Description

template<unsigned m = 3>
struct sw::universal::LNSGenerator< m >

LNS(m): Logarithmic number system with m-bit exponent.

g(x) = 2^(2^(m-1)) * sqrt(x), sequence = 2^(2^(m-1)(1-2^(-i)))

Member Function Documentation

◆ operator()()

template<unsigned m = 3>
template<typename R>
R sw::universal::LNSGenerator< m >::operator() ( const R & x) const
inline

Member Data Documentation

◆ scale_d

template<unsigned m = 3>
double sw::universal::LNSGenerator< m >::scale_d = static_cast<double>(uint64_t(1) << (uint64_t(1) << (m - 1)))
staticconstexpr

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