89 bool operator[] (
int bit)
const noexcept;
92 bool isZero()
const noexcept;
95 bool isOne()
const noexcept;
100 int toInteger()
const noexcept;
105 int64 toInt64()
const noexcept;
109 void clear() noexcept;
112 void clearBit (
int bitNumber) noexcept;
115 void setBit (
int bitNumber);
118 void setBit (
int bitNumber,
bool shouldBeSet);
126 void setRange (
int startBit,
int numBits,
bool shouldBeSet);
129 void insertBit (
int bitNumber,
bool shouldBeSet);
136 BigInteger getBitRange (
int startBit,
int numBits)
const;
145 uint32 getBitRangeAsInt (
int startBit,
int numBits)
const noexcept;
152 void setBitRangeAsInt (
int startBit,
int numBits, uint32 valueToSet);
159 void shiftBits (
int howManyBitsLeft,
int startBit);
162 int countNumberOfSetBits()
const noexcept;
169 int findNextSetBit (
int startIndex)
const noexcept;
176 int findNextClearBit (
int startIndex)
const noexcept;
181 int getHighestBit()
const noexcept;
187 bool isNegative()
const noexcept;
192 void setNegative (
bool shouldBeNegative) noexcept;
197 void negate() noexcept;
226 BigInteger operator<< (
int numBitsToShift)
const;
227 BigInteger operator>> (
int numBitsToShift)
const;
229 bool operator== (
const BigInteger&)
const noexcept;
230 bool operator!= (
const BigInteger&)
const noexcept;
231 bool operator< (
const BigInteger&)
const noexcept;
232 bool operator<= (
const BigInteger&)
const noexcept;
233 bool operator> (
const BigInteger&)
const noexcept;
234 bool operator>= (
const BigInteger&)
const noexcept;
244 int compare (
const BigInteger& other)
const noexcept;
253 int compareAbsolute (
const BigInteger& other)
const noexcept;
274 void inverseModulo (
const BigInteger& modulus);
298 String toString (
int base,
int minimumNumCharacters = 1)
const;
305 void parseString (
StringRef text,
int base);
324 void loadFromMemoryBlock (
const MemoryBlock& data);
328 enum { numPreallocatedInts = 4 };
330 uint32 preallocated[numPreallocatedInts];
331 size_t allocatedSize;
333 bool negative =
false;
335 uint32* getValues()
const noexcept;
336 uint32* ensureSize (
size_t);
337 void shiftLeft (
int bits,
int startBit);
338 void shiftRight (
int bits,
int startBit);