|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Adaptive precision decimal integer number type. More...
#include <edecimal_impl.hpp>
Public Member Functions | |
| constexpr | edecimal () noexcept |
| constexpr | edecimal (const edecimal &)=default |
| constexpr | edecimal (edecimal &&)=default |
| constexpr edecimal & | operator= (const edecimal &)=default |
| constexpr edecimal & | operator= (edecimal &&)=default |
| edecimal (char initial_value) | |
| edecimal (short initial_value) | |
| edecimal (int initial_value) | |
| edecimal (long initial_value) | |
| edecimal (long long initial_value) | |
| edecimal (unsigned char initial_value) | |
| edecimal (unsigned short initial_value) | |
| edecimal (unsigned int initial_value) | |
| edecimal (unsigned long initial_value) | |
| edecimal (unsigned long long initial_value) | |
| edecimal (float initial_value) | |
| edecimal (double initial_value) | |
| edecimal & | operator= (const std::string &digits) |
| edecimal & | operator= (char rhs) |
| edecimal & | operator= (short rhs) |
| edecimal & | operator= (int rhs) |
| edecimal & | operator= (long rhs) |
| edecimal & | operator= (long long rhs) |
| edecimal & | operator= (unsigned char rhs) |
| edecimal & | operator= (unsigned short rhs) |
| edecimal & | operator= (unsigned int rhs) |
| edecimal & | operator= (unsigned long rhs) |
| edecimal & | operator= (unsigned long long rhs) |
| edecimal & | operator= (float rhs) |
| edecimal & | operator= (double rhs) |
| edecimal & | operator+= (const edecimal &rhs) |
| edecimal & | operator-= (const edecimal &rhs) |
| edecimal & | operator*= (const edecimal &rhs) |
| edecimal & | operator/= (const edecimal &rhs) |
| edecimal & | operator%= (const edecimal &rhs) |
| edecimal & | operator<<= (int shift) |
| edecimal & | operator>>= (int shift) |
| edecimal | operator- () const |
| edecimal | operator++ (int) |
| edecimal & | operator++ () |
| edecimal | operator-- (int) |
| edecimal & | operator-- () |
| operator unsigned short () const noexcept | |
| operator unsigned int () const noexcept | |
| operator unsigned long () const noexcept | |
| operator unsigned long long () const noexcept | |
| operator short () const noexcept | |
| operator int () const noexcept | |
| operator long () const noexcept | |
| operator long long () const noexcept | |
| operator float () const noexcept | |
| operator double () const noexcept | |
| operator long double () const noexcept | |
| constexpr bool | iszero () const noexcept |
| constexpr bool | sign () const noexcept |
| constexpr bool | isneg () const noexcept |
| constexpr bool | ispos () const noexcept |
| void | setzero () |
| constexpr void | setsign (bool sign) noexcept |
| constexpr void | setneg () noexcept |
| constexpr void | setpos () noexcept |
| void | setdigit (uint8_t d, bool sign=false) |
| void | setbits (uint64_t v) |
| void | unpad () |
| bool | parse (const std::string &_digits) |
Protected Member Functions | |
| short | to_short () const noexcept |
| int | to_int () const noexcept |
| long | to_long () const noexcept |
| unsigned long long | to_ulong_long () const noexcept |
| long long | to_long_long () const noexcept |
| unsigned short | to_ushort () const noexcept |
| unsigned int | to_uint () const noexcept |
| unsigned long | to_ulong () const noexcept |
| float | to_float () const noexcept |
| double | to_double () const noexcept |
| long double | to_long_double () const noexcept |
| template<typename Ty> | |
| edecimal & | convert_integer (Ty v) |
| template<typename Ty> | |
| edecimal & | convert_ieee754 (Ty rhs) |
Friends | |
| std::ostream & | operator<< (std::ostream &ostr, const edecimal &d) |
| std::istream & | operator>> (std::istream &istr, edecimal &d) |
| bool | operator== (const edecimal &lhs, const edecimal &rhs) |
| logic operators | |
| bool | operator!= (const edecimal &lhs, const edecimal &rhs) |
| bool | operator< (const edecimal &lhs, const edecimal &rhs) |
| bool | operator> (const edecimal &lhs, const edecimal &rhs) |
| bool | operator<= (const edecimal &lhs, const edecimal &rhs) |
| bool | operator>= (const edecimal &lhs, const edecimal &rhs) |
Adaptive precision decimal integer number type.
The digits are managed as a vector with the digit for 10^0 stored at index 0, 10^1 stored at index 1, etc.
|
inlineconstexprnoexcept |
|
constexprdefault |
|
constexprdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
|
inlineconstexprnoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inline |
|
friend |
|
friend |