Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
manipulators.hpp File Reference
#include <string>
#include <sstream>
#include <ios>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <universal/native/integers.hpp>
#include <universal/internal/blockbinary/manipulators.hpp>
#include <universal/number/rational/core.hpp>

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal
namespace  sw::universal::rational_parse

Functions

template<unsigned nbits, typename Base, typename bt>
std::string sw::universal::type_tag (const rational< nbits, Base, bt > &={})
template<unsigned nbits, unsigned base, typename bt>
std::string sw::universal::to_binary (const blockdigit< nbits, base, bt > &v, bool nibbleMarker=true)
template<unsigned nbits, typename Base, typename bt>
std::string sw::universal::to_binary (const rational< nbits, Base, bt > &v, bool nibbleMarker=true)
template<unsigned nbits, typename Base, typename bt>
std::string sw::universal::to_native (const rational< nbits, Base, bt > &v, bool=false)
template<typename Rational>
bool sw::universal::rational_parse::append_digit (Rational &r, int digit, bool negative, const Rational &ten, bool tenFits)
template<typename Rational>
bool sw::universal::rational_parse::scale_by_ten (Rational &r, bool negative, const Rational &ten, bool tenFits)
template<typename Rational>
bool sw::universal::rational_parse::divide_by_ten (Rational &r, const Rational &ten, bool tenFits)
constexpr bool sw::universal::rational_parse::is_digit (char c) noexcept
template<unsigned nbits, typename Base, typename bt>
bool sw::universal::parse (const std::string &txt, rational< nbits, Base, bt > &v)