![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
Template base class for unsigned big integers. More...
#include <arith_uint256.h>
Public Member Functions | |
base_uint () | |
base_uint (const base_uint &b) | |
base_uint & | operator= (const base_uint &b) |
base_uint (uint64_t b) | |
base_uint | operator~ () const |
base_uint | operator- () const |
double | getdouble () const |
base_uint & | operator= (uint64_t b) |
base_uint & | operator^= (const base_uint &b) |
base_uint & | operator&= (const base_uint &b) |
base_uint & | operator|= (const base_uint &b) |
base_uint & | operator^= (uint64_t b) |
base_uint & | operator|= (uint64_t b) |
base_uint & | operator<<= (unsigned int shift) |
base_uint & | operator>>= (unsigned int shift) |
base_uint & | operator+= (const base_uint &b) |
base_uint & | operator-= (const base_uint &b) |
base_uint & | operator+= (uint64_t b64) |
base_uint & | operator-= (uint64_t b64) |
base_uint & | operator*= (uint32_t b32) |
base_uint & | operator*= (const base_uint &b) |
base_uint & | operator/= (const base_uint &b) |
base_uint & | operator++ () |
base_uint | operator++ (int) |
base_uint & | operator-- () |
base_uint | operator-- (int) |
int | CompareTo (const base_uint &b) const |
Numeric ordering (unlike base_blob::Compare) More... | |
bool | EqualTo (uint64_t b) const |
std::string | GetHex () const |
Hex encoding of the number (with the most significant digits first). More... | |
std::string | ToString () const |
unsigned int | size () const |
unsigned int | bits () const |
Returns the position of the highest bit set plus one, or zero if the value is zero. More... | |
uint64_t | GetLow64 () const |
Protected Attributes | |
uint32_t | pn [WIDTH] |
Big integer represented with 32-bit digits, least-significant first. More... | |
Static Protected Attributes | |
static constexpr int | WIDTH = BITS / 32 |
Friends | |
base_uint | operator+ (const base_uint &a, const base_uint &b) |
base_uint | operator- (const base_uint &a, const base_uint &b) |
base_uint | operator* (const base_uint &a, const base_uint &b) |
base_uint | operator/ (const base_uint &a, const base_uint &b) |
base_uint | operator| (const base_uint &a, const base_uint &b) |
base_uint | operator& (const base_uint &a, const base_uint &b) |
base_uint | operator^ (const base_uint &a, const base_uint &b) |
base_uint | operator>> (const base_uint &a, int shift) |
base_uint | operator<< (const base_uint &a, int shift) |
base_uint | operator* (const base_uint &a, uint32_t b) |
bool | operator== (const base_uint &a, const base_uint &b) |
std::strong_ordering | operator<=> (const base_uint &a, const base_uint &b) |
bool | operator== (const base_uint &a, uint64_t b) |
Template base class for unsigned big integers.
Definition at line 25 of file arith_uint256.h.
|
inline |
Definition at line 34 of file arith_uint256.h.
|
inline |
Definition at line 40 of file arith_uint256.h.
|
inline |
Definition at line 55 of file arith_uint256.h.
unsigned int base_uint< BITS >::bits |
Returns the position of the highest bit set plus one, or zero if the value is zero.
Definition at line 156 of file arith_uint256.cpp.
Numeric ordering (unlike base_blob::Compare)
Definition at line 102 of file arith_uint256.cpp.
bool base_uint< BITS >::EqualTo | ( | uint64_t | b | ) | const |
Definition at line 114 of file arith_uint256.cpp.
double base_uint< BITS >::getdouble |
std::string base_uint< BITS >::GetHex |
Hex encoding of the number (with the most significant digits first).
Definition at line 140 of file arith_uint256.cpp.
|
inline |
|
inline |
Definition at line 98 of file arith_uint256.h.
base_uint< BITS > & base_uint< BITS >::operator*= | ( | const base_uint< BITS > & | b | ) |
Definition at line 60 of file arith_uint256.cpp.
Definition at line 48 of file arith_uint256.cpp.
Definition at line 167 of file arith_uint256.h.
Definition at line 176 of file arith_uint256.h.
|
inline |
Definition at line 129 of file arith_uint256.h.
Definition at line 147 of file arith_uint256.h.
Definition at line 71 of file arith_uint256.h.
Definition at line 184 of file arith_uint256.h.
Definition at line 193 of file arith_uint256.h.
|
inline |
Definition at line 141 of file arith_uint256.h.
Definition at line 155 of file arith_uint256.h.
template base_uint< 6144 > & base_uint< BITS >::operator/= | ( | const base_uint< BITS > & | b | ) |
Definition at line 76 of file arith_uint256.cpp.
base_uint< BITS > & base_uint< BITS >::operator<<= | ( | unsigned int | shift | ) |
Definition at line 1 of file arith_uint256.cpp.
|
inline |
Definition at line 46 of file arith_uint256.h.
Definition at line 82 of file arith_uint256.h.
base_uint< BITS > & base_uint< BITS >::operator>>= | ( | unsigned int | shift | ) |
Definition at line 31 of file arith_uint256.cpp.
|
inline |
Definition at line 91 of file arith_uint256.h.
Definition at line 112 of file arith_uint256.h.
|
inline |
Definition at line 105 of file arith_uint256.h.
Definition at line 119 of file arith_uint256.h.
Definition at line 63 of file arith_uint256.h.
|
inline |
std::string base_uint< BITS >::ToString |
|
friend |
Definition at line 210 of file arith_uint256.h.
|
friend |
Definition at line 207 of file arith_uint256.h.
Definition at line 214 of file arith_uint256.h.
|
friend |
Definition at line 205 of file arith_uint256.h.
|
friend |
Definition at line 206 of file arith_uint256.h.
|
friend |
Definition at line 208 of file arith_uint256.h.
Definition at line 213 of file arith_uint256.h.
|
friend |
Definition at line 216 of file arith_uint256.h.
|
friend |
Definition at line 215 of file arith_uint256.h.
|
friend |
Definition at line 217 of file arith_uint256.h.
Definition at line 212 of file arith_uint256.h.
|
friend |
Definition at line 211 of file arith_uint256.h.
|
friend |
Definition at line 209 of file arith_uint256.h.
Big integer represented with 32-bit digits, least-significant first.
Definition at line 31 of file arith_uint256.h.
|
staticconstexprprotected |
Definition at line 29 of file arith_uint256.h.