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::rational_parse Namespace Reference

Functions

template<typename Rational>
bool append_digit (Rational &r, int digit, bool negative, const Rational &ten, bool tenFits)
template<typename Rational>
bool scale_by_ten (Rational &r, bool negative, const Rational &ten, bool tenFits)
template<typename Rational>
bool divide_by_ten (Rational &r, const Rational &ten, bool tenFits)
constexpr bool is_digit (char c) noexcept

Function Documentation

◆ append_digit()

template<typename Rational>
bool sw::universal::rational_parse::append_digit ( Rational & r,
int digit,
bool negative,
const Rational & ten,
bool tenFits )

◆ divide_by_ten()

template<typename Rational>
bool sw::universal::rational_parse::divide_by_ten ( Rational & r,
const Rational & ten,
bool tenFits )

◆ is_digit()

bool sw::universal::rational_parse::is_digit ( char c)
constexprnoexcept

◆ scale_by_ten()

template<typename Rational>
bool sw::universal::rational_parse::scale_by_ten ( Rational & r,
bool negative,
const Rational & ten,
bool tenFits )