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::block< FpType > Struct Template Reference

#include <block.hpp>

Public Types

using fp_type = FpType
using exp_t = integer<256, std::uint32_t>

Public Member Functions

constexpr int sign () const noexcept
constexpr int scale_of_v () const noexcept
constexpr exp_t exponent () const noexcept
constexpr bool is_zero_block () const noexcept
constexpr block & bias_for_eft () noexcept
constexpr block & normalise () noexcept
constexpr bool is_normalised () const noexcept
template<typename T = double>
T value_as () const noexcept

Static Public Member Functions

static constexpr int eft_scale_bias ()

Public Attributes

FpType v
exp_t exp

Static Public Attributes

static constexpr int k = std::numeric_limits<FpType>::digits
static constexpr bool needs_scale_normalisation = true

Member Typedef Documentation

◆ exp_t

template<typename FpType>
using sw::universal::block< FpType >::exp_t = integer<256, std::uint32_t>

◆ fp_type

template<typename FpType>
using sw::universal::block< FpType >::fp_type = FpType

Member Function Documentation

◆ bias_for_eft()

template<typename FpType>
block & sw::universal::block< FpType >::bias_for_eft ( )
inlineconstexprnoexcept

◆ eft_scale_bias()

template<typename FpType>
constexpr int sw::universal::block< FpType >::eft_scale_bias ( )
inlinestaticconstexpr

◆ exponent()

template<typename FpType>
exp_t sw::universal::block< FpType >::exponent ( ) const
inlineconstexprnoexcept

◆ is_normalised()

template<typename FpType>
bool sw::universal::block< FpType >::is_normalised ( ) const
inlineconstexprnoexcept

◆ is_zero_block()

template<typename FpType>
bool sw::universal::block< FpType >::is_zero_block ( ) const
inlineconstexprnoexcept

◆ normalise()

template<typename FpType>
block & sw::universal::block< FpType >::normalise ( )
inlineconstexprnoexcept

◆ scale_of_v()

template<typename FpType>
int sw::universal::block< FpType >::scale_of_v ( ) const
inlineconstexprnoexcept

◆ sign()

template<typename FpType>
int sw::universal::block< FpType >::sign ( ) const
inlineconstexprnoexcept

◆ value_as()

template<typename FpType>
template<typename T = double>
T sw::universal::block< FpType >::value_as ( ) const
inlinenoexcept

Member Data Documentation

◆ exp

template<typename FpType>
exp_t sw::universal::block< FpType >::exp

◆ k

template<typename FpType>
int sw::universal::block< FpType >::k = std::numeric_limits<FpType>::digits
staticconstexpr

◆ needs_scale_normalisation

template<typename FpType>
bool sw::universal::block< FpType >::needs_scale_normalisation = true
staticconstexpr

◆ v

template<typename FpType>
FpType sw::universal::block< FpType >::v

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