Library / System / Conversions / FloatBigInt
FloatBigInt
Fields 1
int32 MAX_LIMBSConstructors 1
INIT()Methods 13
METHOD isZero() RETURNS booleanreads
MODIFY METHOD setSmall(uint64 v) RETURNS voidmodifies
Set to a value that fits in 64 bits.
MODIFY METHOD mulAddSmall(uint32 mul, uint32 add) RETURNS voidmodifies
self := self * mul + add (mul, add each fit in 32 bits; mul >= 1).
METHOD pow10Small(int32 e) RETURNS uint32reads
10^e for e in 0..8 (fits uint32; e<=8 keeps it under 10^9 < 2^32).
MODIFY METHOD mulPow10(int32 k) RETURNS voidmodifies
self := self * 10^k (k >= 0). Chunked by 10^9 per pass (the largest power of ten a uint32 multiplier holds), then a final <10^9 remainder.
MODIFY METHOD setPow10(int32 k) RETURNS voidmodifies
self := 10^k (k >= 0). The denominator-construction path.
MODIFY METHOD shiftLeftBits(int32 n) RETURNS voidmodifies
self := self * 2^n
MODIFY METHOD appendLimbHi(uint32 v) RETURNS voidmodifies
Append a limb as the new most-significant limb (internal builder for cloning self into a scratch value without passing SELF).
METHOD bitLength() RETURNS int32reads
Number of significant bits (0 for zero). floor(log2(self)) + 1.
METHOD cloneBig() RETURNS FloatBigIntreads
A fresh independent copy of self (reads own limbs, builds the copy through its own appendLimbHi — never passes SELF).
METHOD cmp(REFERENCE FloatBigInt other) RETURNS int32reads
Ordering vs another big int: -1 (self < other), 0 (equal), 1 (self > other).
MODIFY METHOD addBig(REFERENCE FloatBigInt other) RETURNS voidmodifies
self := self + other
MODIFY METHOD subBig(REFERENCE FloatBigInt other) RETURNS voidmodifies
self := self - other (precondition: self >= other)