|
GnuCash c935c2f+
|
provides a 125-bit int as a base class for GncNumeric. More...
Data Structures | |
| class | GncInt128 |
Functions | |
| GncInt128 | operator+ (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator- (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator* (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator/ (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator% (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator& (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator| (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator^ (GncInt128 a, const GncInt128 &b) noexcept |
| GncInt128 | operator<< (GncInt128 a, unsigned int b) noexcept |
| GncInt128 | operator>> (GncInt128 a, unsigned int b) noexcept |
| bool | operator== (const GncInt128 &a, const GncInt128 &b) noexcept |
| bool | operator!= (const GncInt128 &a, const GncInt128 &b) noexcept |
| bool | operator<= (const GncInt128 &a, const GncInt128 &b) noexcept |
| bool | operator>= (const GncInt128 &a, const GncInt128 &b) noexcept |
| bool | operator< (const GncInt128 &a, const GncInt128 &b) noexcept |
| bool | operator> (const GncInt128 &a, const GncInt128 &b) noexcept |
| std::ostream & | operator<< (std::ostream &, const GncInt128 &) noexcept |
| GncInt128 | gcd (int64_t a, int64_t b) |
| Compute the greatest common denominator of two integers. | |
| GncInt128 | lcm (int64_t a, int64_t b) |
| Compute the least common multiple of two integers. | |
provides a 125-bit int as a base class for GncNumeric.
In order to make space for the status flags the upper leg is limited to 0x1fffffffffffffff. Attempting to construct a GncInt128 with a larger upper leg will throw a std::overflow_error.
All the usual operators are provided. Only the constructors and explicit integer conversions throw; all other errors are indicated by the overflow and NaN ("Not a Number") flags. Note that performing any operation on an overflowed or NaN Gncint128 will yield an overflowed or NaN result, so calling routines need not check until the end of a chained calculation. GncInt128 uses implicit copy and move constructors and implicit destructor.
Definition at line 972 of file gnc-int128.cpp.
Definition at line 1029 of file gnc-int128.cpp.
Definition at line 1036 of file gnc-int128.cpp.
Definition at line 1015 of file gnc-int128.cpp.
Definition at line 1002 of file gnc-int128.cpp.
Definition at line 1009 of file gnc-int128.cpp.
Definition at line 1022 of file gnc-int128.cpp.
Definition at line 977 of file gnc-int128.cpp.
Definition at line 1056 of file gnc-int128.cpp.
|
noexcept |
Definition at line 957 of file gnc-int128.cpp.
Definition at line 989 of file gnc-int128.cpp.
Definition at line 966 of file gnc-int128.cpp.
Definition at line 984 of file gnc-int128.cpp.
Definition at line 996 of file gnc-int128.cpp.
Definition at line 1064 of file gnc-int128.cpp.
Definition at line 1050 of file gnc-int128.cpp.
Definition at line 1043 of file gnc-int128.cpp.