Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
arith_uint256.h
Go to the documentation of this file.
34 static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
42 static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
57 static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
216 friend inline const base_uint operator+(const base_uint& a, const base_uint& b) { return base_uint(a) += b; }
217 friend inline const base_uint operator-(const base_uint& a, const base_uint& b) { return base_uint(a) -= b; }
218 friend inline const base_uint operator*(const base_uint& a, const base_uint& b) { return base_uint(a) *= b; }
219 friend inline const base_uint operator/(const base_uint& a, const base_uint& b) { return base_uint(a) /= b; }
220 friend inline const base_uint operator|(const base_uint& a, const base_uint& b) { return base_uint(a) |= b; }
221 friend inline const base_uint operator&(const base_uint& a, const base_uint& b) { return base_uint(a) &= b; }
222 friend inline const base_uint operator^(const base_uint& a, const base_uint& b) { return base_uint(a) ^= b; }
223 friend inline const base_uint operator>>(const base_uint& a, int shift) { return base_uint(a) >>= shift; }
224 friend inline const base_uint operator<<(const base_uint& a, int shift) { return base_uint(a) <<= shift; }
225 friend inline const base_uint operator*(const base_uint& a, uint32_t b) { return base_uint(a) *= b; }
226 friend inline bool operator==(const base_uint& a, const base_uint& b) { return memcmp(a.pn, b.pn, sizeof(a.pn)) == 0; }
227 friend inline bool operator!=(const base_uint& a, const base_uint& b) { return memcmp(a.pn, b.pn, sizeof(a.pn)) != 0; }
228 friend inline bool operator>(const base_uint& a, const base_uint& b) { return a.CompareTo(b) > 0; }
229 friend inline bool operator<(const base_uint& a, const base_uint& b) { return a.CompareTo(b) < 0; }
230 friend inline bool operator>=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) >= 0; }
231 friend inline bool operator<=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) <= 0; }
253 static_assert(WIDTH >= 2, "Assertion WIDTH >= 2 failed (WIDTH = BITS / 32). BITS is a template parameter.");
286 arith_uint256& SetCompact(uint32_t nCompact, bool *pfNegative = nullptr, bool *pfOverflow = nullptr);
friend const base_uint operator^(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:222
friend const base_uint operator*(const base_uint &a, uint32_t b)
Definition: arith_uint256.h:225
friend const base_uint operator &(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:221
friend bool operator!=(const base_uint &a, uint64_t b)
Definition: arith_uint256.h:233
friend bool operator<=(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:231
friend bool operator>(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:228
Definition: box.hpp:161
friend const base_uint operator-(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:217
friend const base_uint operator/(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:219
uint32_t GetCompact(bool fNegative=false) const
Definition: arith_uint256.cpp:226
Definition: arith_uint256.h:18
friend bool operator==(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:226
friend const base_uint operator+(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:216
friend bool operator<(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:229
friend const base_uint operator*(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:218
friend uint256 ArithToUint256(const arith_uint256 &)
Definition: arith_uint256.cpp:249
friend bool operator!=(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:227
friend const base_uint operator|(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:220
arith_uint256 & SetCompact(uint32_t nCompact, bool *pfNegative=nullptr, bool *pfOverflow=nullptr)
The "compact" format is a representation of a whole number N using an unsigned 32bit number similar t...
Definition: arith_uint256.cpp:206
friend const base_uint operator<<(const base_uint &a, int shift)
Definition: arith_uint256.h:224
friend bool operator>=(const base_uint &a, const base_uint &b)
Definition: arith_uint256.h:230
friend bool operator==(const base_uint &a, uint64_t b)
Definition: arith_uint256.h:232
friend const base_uint operator>>(const base_uint &a, int shift)
Definition: arith_uint256.h:223
friend arith_uint256 UintToArith256(const uint256 &)
Definition: arith_uint256.cpp:256
unsigned int bits() const
Returns the position of the highest bit set plus one, or zero if the value is zero.
Definition: arith_uint256.cpp:174