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::cordic::decimal_detail Namespace Reference

Classes

struct  config
struct  bt_of
struct  bt_of< W, std::void_t< typename W::BlockType > >
struct  decimal_register
struct  tables
struct  reduction
struct  digits
struct  vectored

Typedefs

template<unsigned N, unsigned R, typename bt>
using datapath = dfixpnt<N, R, DecimalEncoding::BCD, Modulo, bt>
template<typename W>
using bt_of_t = typename bt_of<W>::type
template<typename Work>
using generator = datapath<Work::radix + 8u + 4u, Work::radix + 8u, bt_of_t<Work>>

Functions

constexpr unsigned digits_of (unsigned v) noexcept
template<unsigned N, unsigned R>
decimal_register< N, R > shifted_right (const decimal_register< N, R > &v, unsigned j)
template<typename D>
D shifted_right (const D &v, unsigned j)
template<typename D>
D pow10_negative (unsigned j)
template<typename To, bool saturate, typename From>
To round_digits (const From &v, unsigned shift)
template<typename D, typename Src>
D placed (const Src &v, unsigned shift)
template<typename G>
G atan_inverse (int m)
template<typename G>
G atan_pow10 (unsigned j)
template<typename G>
G pi_over_4 ()
template<typename G>
G inverse_sqrt (const G &P)
template<typename Work>
const tables< Work > & tables_of ()
template<typename Red>
const reduction< Red > & reduction_of ()
template<typename Work>
void step (Work &x, Work &y, Work &z, unsigned j, const Work &alpha, bool up)
constexpr unsigned rotations_at (unsigned j) noexcept
template<typename Work>
void rotate (Work &x, Work &y, Work &z, unsigned n, const tables< Work > &T)
template<typename Work>
void vector (Work &x, Work &y, Work &z, unsigned n, const tables< Work > &T)
constexpr unsigned clamp_iterations (unsigned n, unsigned maxN) noexcept
template<unsigned M, typename Fixed>
digits< M > magnitude_of (const Fixed &f)
template<typename Vec, unsigned M>
vectored< Vec > vector_magnitudes (const digits< M > &ax, const digits< M > &ay, unsigned n)

Typedef Documentation

◆ bt_of_t

template<typename W>
using sw::universal::cordic::decimal_detail::bt_of_t = typename bt_of<W>::type

◆ datapath

template<unsigned N, unsigned R, typename bt>
using sw::universal::cordic::decimal_detail::datapath = dfixpnt<N, R, DecimalEncoding::BCD, Modulo, bt>

◆ generator

template<typename Work>
using sw::universal::cordic::decimal_detail::generator = datapath<Work::radix + 8u + 4u, Work::radix + 8u, bt_of_t<Work>>

Function Documentation

◆ atan_inverse()

template<typename G>
G sw::universal::cordic::decimal_detail::atan_inverse ( int m)

◆ atan_pow10()

template<typename G>
G sw::universal::cordic::decimal_detail::atan_pow10 ( unsigned j)

◆ clamp_iterations()

unsigned sw::universal::cordic::decimal_detail::clamp_iterations ( unsigned n,
unsigned maxN )
constexprnoexcept

◆ digits_of()

unsigned sw::universal::cordic::decimal_detail::digits_of ( unsigned v)
constexprnoexcept

◆ inverse_sqrt()

template<typename G>
G sw::universal::cordic::decimal_detail::inverse_sqrt ( const G & P)

◆ magnitude_of()

template<unsigned M, typename Fixed>
digits< M > sw::universal::cordic::decimal_detail::magnitude_of ( const Fixed & f)

◆ pi_over_4()

template<typename G>
G sw::universal::cordic::decimal_detail::pi_over_4 ( )

◆ placed()

template<typename D, typename Src>
D sw::universal::cordic::decimal_detail::placed ( const Src & v,
unsigned shift )

◆ pow10_negative()

template<typename D>
D sw::universal::cordic::decimal_detail::pow10_negative ( unsigned j)

◆ reduction_of()

template<typename Red>
const reduction< Red > & sw::universal::cordic::decimal_detail::reduction_of ( )

◆ rotate()

template<typename Work>
void sw::universal::cordic::decimal_detail::rotate ( Work & x,
Work & y,
Work & z,
unsigned n,
const tables< Work > & T )

◆ rotations_at()

unsigned sw::universal::cordic::decimal_detail::rotations_at ( unsigned j)
constexprnoexcept

◆ round_digits()

template<typename To, bool saturate, typename From>
To sw::universal::cordic::decimal_detail::round_digits ( const From & v,
unsigned shift )

◆ shifted_right() [1/2]

template<typename D>
D sw::universal::cordic::decimal_detail::shifted_right ( const D & v,
unsigned j )

◆ shifted_right() [2/2]

template<unsigned N, unsigned R>
decimal_register< N, R > sw::universal::cordic::decimal_detail::shifted_right ( const decimal_register< N, R > & v,
unsigned j )

◆ step()

template<typename Work>
void sw::universal::cordic::decimal_detail::step ( Work & x,
Work & y,
Work & z,
unsigned j,
const Work & alpha,
bool up )

◆ tables_of()

template<typename Work>
const tables< Work > & sw::universal::cordic::decimal_detail::tables_of ( )

◆ vector()

template<typename Work>
void sw::universal::cordic::decimal_detail::vector ( Work & x,
Work & y,
Work & z,
unsigned n,
const tables< Work > & T )

◆ vector_magnitudes()

template<typename Vec, unsigned M>
vectored< Vec > sw::universal::cordic::decimal_detail::vector_magnitudes ( const digits< M > & ax,
const digits< M > & ay,
unsigned n )