|
| | FastInt () noexcept=default |
template<typename T>
requires detail::cFitsFastInt128<T> |
| constexpr | FastInt (T v) noexcept |
| | sign-extends the given value, which must fit in 128 bits
|
template<int mBits>
requires ( mBits < nBits ) |
| constexpr | FastInt (const FastInt< mBits > &v) noexcept |
| | sign-extends a narrower value of this family
|
template<int mBits>
requires ( mBits > nBits ) |
| constexpr | FastInt (const FastInt< mBits > &v) noexcept |
| constexpr int | sign () const noexcept |
| | -1, 0 or 1 if the value is negative, zero or positive respectively
|
| constexpr FastInt & | operator+= (const FastInt &b) noexcept |
| constexpr FastInt & | operator-= (const FastInt &b) noexcept |
| constexpr FastInt | operator- () const noexcept |
template<int nBits>
class MR::FastInt< nBits >
signed integer of nBits bits, which must be a multiple of 64 and at least 192 (below that use FastInt128 with Int64Mul128 and Int128Mul256); the product of two of them is exact, because it is twice as wide as the arguments; as FastInt128 it lacks a sqrt-function and stream input/output
template<int nBits>
template<int mBits>
requires ( mBits > nBits )
|
|
inlineexplicitconstexprnoexcept |
takes the lowest nBits bits of a wider value of this family, which must be enough to represent it exactly; as every product below widens, this is how a value with a proven bound returns to the narrow type where it belongs
the value does not fit in nBits bits