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

Posit(m): g(x) = b*x where b = 2^(2^m) Posit(0): b=2, Posit(1): b=4, Posit(2): b=16, Posit(3): b=256. More...

#include <generators.hpp>

Public Member Functions

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

Static Public Attributes

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

Detailed Description

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

Posit(m): g(x) = b*x where b = 2^(2^m) Posit(0): b=2, Posit(1): b=4, Posit(2): b=16, Posit(3): b=256.

Member Function Documentation

◆ operator()()

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

Member Data Documentation

◆ base_d

template<unsigned m = 0>
double sw::universal::PositGenerator< m >::base_d = static_cast<double>(uint64_t(1) << (uint64_t(1) << m))
staticconstexpr

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