An integer of any size, with the arithmetic and comparison operators of a built-in integer. More...
| Header: | #include <InfInt> |
InfInt stores the magnitude as a vector of base-10^9 digits and the sign as a flag. It has the arithmetic, comparison and stream operators, and conversions to and from the built-in integer types and strings. intSqrt(), digitAt(), numberOfDigits() and size() give the integer square root, one decimal digit, the number of decimal digits and the size in bytes. An error, such as a division by zero or an overflow in a conversion, is reported with qWarning(), because the tree uses no exceptions.
BaseTranscode uses InfInt to convert data between number bases that do not fit in a built-in integer.