Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
pow.hpp File Reference
#include <algorithm>
#include <bit>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <vector>
#include <universal/number/efloat/math/exponent.hpp>
#include <universal/number/efloat/math/logarithm.hpp>
#include <universal/number/efloat/math/classify.hpp>
#include <universal/number/efloat/math/truncate.hpp>

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal
namespace  sw::universal::efloat_detail
 decimal formatting (binary -> decimal string at arbitrary precision)

Functions

template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::integer_power_working (const efloat< nlimbs > &x, uint64_t n, bool reciprocal, unsigned target)
constexpr unsigned sw::universal::efloat_detail::pow_exact_bits (unsigned precision)
template<unsigned nlimbs>
constexpr bool sw::universal::efloat_detail::power_in_range (const efloat< nlimbs > &x, uint64_t n)
template<unsigned nlimbs>
constexpr bool sw::universal::efloat_detail::exact_pow (const efloat< nlimbs > &x, const efloat< nlimbs > &y, unsigned precision, efloat< nlimbs > &result)
constexpr bool sw::universal::efloat_detail::keep_top (limb_kernels::limb_t *a, std::size_t &na, const limb_kernels::limb_t *p, std::size_t np, std::size_t w, int64_t &sh)
constexpr bool sw::universal::efloat_detail::limbs_can_round (const limb_kernels::limb_t *a, std::size_t n, unsigned precision, unsigned correct)
template<unsigned nlimbs>
constexpr bool sw::universal::efloat_detail::integer_power_limbs (efloat< nlimbs > &result, const efloat< nlimbs > &x, uint64_t n, bool reciprocal, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::pow_working (const efloat< nlimbs > &x, const efloat< nlimbs > &y, unsigned target, int &range)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::integer_power (efloat< nlimbs > base, int exponent)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::pow (const efloat< nlimbs > &x, int y)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::pow (const efloat< nlimbs > &x, const efloat< nlimbs > &y)

Variables

constexpr unsigned sw::universal::efloat_detail::pow_error_bits = exp_error_bits + 8u
constexpr unsigned sw::universal::efloat_detail::integer_power_error_bits = 8u