Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
round.hpp File Reference
#include <cmath>
#include <algorithm>
#include <vector>
#include <cstdint>
#include <universal/behavior/rounding.hpp>
#include <universal/number/elreal/block.hpp>
#include <universal/number/elreal/zbcl.hpp>
#include <universal/number/dd/core.hpp>
#include <universal/number/qd/core.hpp>
#include <universal/number/cfloat/core.hpp>
#include <universal/traits/cfloat_traits.hpp>

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal
namespace  sw::universal::elreal_round_detail

Functions

void sw::universal::elreal_round_detail::two_sum (double a, double b, double &s, double &e) noexcept
std::vector< double > sw::universal::elreal_round_detail::renorm (const std::vector< double > &v)
void sw::universal::elreal_round_detail::split_at (double d, int c, double &hi, double &lo) noexcept
std::vector< double > sw::universal::elreal_round_detail::round_expansion_at (const std::vector< double > &blk, int cut, RoundingMode mode, bool moreBelow)
template<typename FpType>
std::vector< double > sw::universal::elreal_round_detail::round_to_bits (const ZBCL< FpType > &x, int P, RoundingMode mode)
template<typename Cf>
Cf sw::universal::elreal_round_detail::cfloat_overflow (bool sign, RoundingMode mode)
template<typename Cf>
Cf sw::universal::elreal_round_detail::cfloat_underflow (bool sign, RoundingMode mode)
template<typename Cf>
Cf sw::universal::elreal_round_detail::cfloat_assemble (bool sign, std::uint64_t biasedExponent, std::uint64_t fracbits)
template<typename Cf, typename FpType>
Cf sw::universal::elreal_round_detail::round_to_cfloat (const ZBCL< FpType > &x, RoundingMode mode)
template<typename Target, typename FpType>
Target sw::universal::round_to (const ZBCL< FpType > &x, RoundingMode mode=RoundingMode::RoundToNearest)