Duke's Big Numbers 1.0
C++ and Blueprint libraries for performing math, analysis, and formatting with really large numbers (>10e308).
Loading...
Searching...
No Matches
BigInteger.h
1// Copyright (C)2023 Smiling Cat Entertainment, LTD. All Rights Reserved.
2
3#pragma once
4#define _USE_MATH_DEFINES
5
6#include "Inline.h"
7#include <corecrt_math_defines.h>
8#include "CoreMinimal.h"
9#include "UObject/NoExportTypes.h"
10#include "MoreMath.h"
11#include "BigInteger.generated.h"
12
48USTRUCT(BlueprintType)
50{
51 GENERATED_BODY()
52
53private:
54 UPROPERTY()
55 TArray<uint32> Bits;
56 UPROPERTY()
57 int32 Sign;
58
59public:
65
71 explicit FBigInteger(bool value);
72
78 FBigInteger(int8 value);
79
85 FBigInteger(uint8 value);
86
92 FBigInteger(int16 value);
93
99 FBigInteger(uint16 value);
100
106 FBigInteger(int32 value);
107
113 FBigInteger(uint32 value);
114
120 FBigInteger(int64 value);
121
127 explicit FBigInteger(uint64 value);
128
134 FBigInteger(float value);
135
141 FBigInteger(double value);
142
149 explicit FBigInteger(const TArray<uint8>& value);
150
157 FBigInteger(const TArray<uint8>& magnitude, bool isNegative);
158
165 explicit FBigInteger(const TArray<uint32>& value);
166
173 FBigInteger(const TArray<uint32>& magnitude, bool isNegative);
174
179 static const FBigInteger Zero;
180
185 static const FBigInteger One;
186
191 static const FBigInteger MinusOne;
192
200 static FBigInteger Add(const FBigInteger& lhs, const FBigInteger& rhs);
201
209 static FBigInteger Subtract(const FBigInteger& lhs, const FBigInteger& rhs);
210
218 static FBigInteger Multiply(const FBigInteger& lhs, const FBigInteger& rhs);
219
227 static FBigInteger Divide(const FBigInteger& lhs, uint32 rhs);
228
236 static FBigInteger Divide(const FBigInteger& lhs, uint64 rhs);
237
245 static FBigInteger Divide(const FBigInteger& lhs, const FBigInteger& rhs);
246
256 static uint32 Remainder(const FBigInteger& lhs, const uint32 rhs);
257
267 static uint64 Remainder(const FBigInteger& lhs, const uint64 rhs);
268
276 static FBigInteger Remainder(const FBigInteger& lhs, const FBigInteger& rhs);
277
288 static uint32 DivRem(const FBigInteger& lhs, uint32 rhs, FBigInteger& quotient);
289
300 static uint64 DivRem(const FBigInteger& lhs, uint64 rhs, FBigInteger& quotient);
301
310 static FBigInteger DivRem(const FBigInteger& lhs, const FBigInteger& rhs, FBigInteger& quotient);
311
320 static FBigInteger And(const FBigInteger& lhs, const FBigInteger& rhs);
321
330 static FBigInteger Or(const FBigInteger& lhs, const FBigInteger& rhs);
331
340 static FBigInteger Xor(const FBigInteger& lhs, const FBigInteger& rhs);
341
353 static FBigInteger Invert(const FBigInteger& value);
354
361 static FBigInteger Increment(const FBigInteger& value);
362
369 static FBigInteger Decrement(const FBigInteger& value);
370
378 static FBigInteger ClearBit(const FBigInteger& value, int32 bitIndex);
379
387 static FBigInteger SetBit(const FBigInteger& value, int32 bitIndex);
388
396 static FBigInteger ToggleBit(const FBigInteger& value, int32 bitIndex);
397
407 static FBigInteger SetWord(const FBigInteger& value, int32 index, uint32 word);
408
416 static FBigInteger ShiftLeft(const FBigInteger& value, int32 shift);
417
425 static FBigInteger ShiftRight(const FBigInteger& value, int32 shift);
426
433 static FBigInteger Negate(const FBigInteger& value);
434
443 static FBigInteger SetSign(const FBigInteger& value, bool isNegative);
444
451 static FBigInteger Abs(const FBigInteger& value);
452
459 static FBigInteger Nabs(const FBigInteger& value);
460
468 static FBigInteger CopySign(const FBigInteger& lhs, const FBigInteger& rhs);
469
477 static const FBigInteger& Max(const FBigInteger& lhs, const FBigInteger& rhs);
478
486 static const FBigInteger& MaxMagnitude(const FBigInteger& lhs, const FBigInteger& rhs);
487
495 static const FBigInteger& Min(const FBigInteger& lhs, const FBigInteger& rhs);
496
504 static const FBigInteger& MinMagnitude(const FBigInteger& lhs, const FBigInteger& rhs);
505
514 static const FBigInteger& Select(const FBigInteger& whenTrue, const FBigInteger& whenFalse, bool condition);
515
524 static const FBigInteger& Clamp(const FBigInteger& value, const FBigInteger& min, const FBigInteger& max);
525
533 static int32 CountPrecisionBits(const FBigInteger& value);
534
542 static int32 Nlz(const FBigInteger& value);
543
550 static int32 Ntz(const FBigInteger& value);
551
558 static int32 Pop(const FBigInteger& value);
559
569 static int32 Compare(int32 lhs, const FBigInteger& rhs);
570
580 static int32 Compare(uint32 lhs, const FBigInteger& rhs);
581
591 static int32 Compare(int64 lhs, const FBigInteger& rhs);
592
602 static int32 Compare(uint64 lhs, const FBigInteger& rhs);
603
613 static int32 Compare(const FBigInteger& lhs, int32 rhs);
614
624 static int32 Compare(const FBigInteger& lhs, uint32 rhs);
625
635 static int32 Compare(const FBigInteger& lhs, int64 rhs);
636
646 static int32 Compare(const FBigInteger& lhs, uint64 rhs);
647
657 static int32 Compare(const FBigInteger& lhs, const FBigInteger& rhs);
658
668 static int32 CompareMagnitude(const FBigInteger& lhs, const FBigInteger& rhs);
669
676 static uint32 FloorLog10(const FBigInteger& value);
677
686 static uint32 FloorLog2(const FBigInteger& value);
687
694 static float Log10(const FBigInteger& value);
695
702 static double Log10D(const FBigInteger& value);
703
710 static float Log2(const FBigInteger& value);
711
718 static double Log2D(const FBigInteger& value);
719
726 static float Loge(const FBigInteger& value);
727
734 static double LogeD(const FBigInteger& value);
735
744 static float LogX(float base, const FBigInteger& value);
745
754 static double LogX(double base, const FBigInteger& value);
755
763 static FBigInteger Pow(int32 base, int32 exponent);
764
772 static FBigInteger Pow(const FBigInteger& base, int32 exponent);
773
781 static FBigInteger Pow(const FBigInteger& base, float exponent);
782
789 static FBigInteger Sqrt(const FBigInteger& value);
790
798 static uint32 Gcd(const FBigInteger& lhs, uint32 rhs);
799
807 static uint64 Gcd(const FBigInteger& lhs, uint64 rhs);
808
816 static FBigInteger Gcd(const FBigInteger& lhs, const FBigInteger& rhs);
817
824 FBigInteger Add(const FBigInteger& rhs) const;
825
832 FBigInteger Subtract(const FBigInteger& rhs) const;
833
841
848 FBigInteger Divide(uint32 rhs) const;
849
856 FBigInteger Divide(uint64 rhs) const;
857
864 FBigInteger Divide(const FBigInteger& rhs) const;
865
874 uint32 Remainder(uint32 rhs) const;
875
884 uint64 Remainder(uint64 rhs) const;
885
892 FBigInteger Remainder(const FBigInteger& rhs) const;
893
903 uint32 DivRem(const uint32 divisor, FBigInteger& quotient) const;
904
914 uint64 DivRem(const uint64 divisor, FBigInteger& quotient) const;
915
923 FBigInteger DivRem(const FBigInteger& divisor, FBigInteger& quotient) const;
924
932 FBigInteger And(const FBigInteger& rhs) const;
933
941 FBigInteger Or(const FBigInteger& rhs) const;
942
950 FBigInteger Xor(const FBigInteger& rhs) const;
951
962 FBigInteger Invert() const;
963
969 FBigInteger Increment() const;
970
976 FBigInteger Decrement() const;
977
984 FBigInteger ClearBit(int32 bitIndex) const;
985
992 FBigInteger SetBit(int32 bitIndex) const;
993
1000 FBigInteger ToggleBit(int32 bitIndex) const;
1001
1010 FBigInteger SetWord(int32 index, uint32 word) const;
1011
1018 FBigInteger ShiftLeft(int32 shift) const;
1019
1026 FBigInteger ShiftRight(int32 shift) const;
1027
1033 FBigInteger Negate() const;
1034
1042 FBigInteger SetSign(bool isNegative) const;
1043
1049 FBigInteger Abs() const;
1050
1056 FBigInteger Nabs() const;
1057
1064 FBigInteger CopySign(const FBigInteger& rhs) const;
1065
1073 const FBigInteger& Clamp(const FBigInteger& min, const FBigInteger& max) const;
1074
1081 int32 CountPrecisionBits() const;
1082
1089 int32 Nlz() const;
1090
1096 int32 Ntz() const;
1097
1103 int32 Pop() const;
1104
1112 void GetBaseTwoComponents(uint32& mantissa, int32& exponent) const;
1113
1121 void GetBaseTwoComponents(uint64& mantissa, int32& exponent) const;
1122
1128 int32 GetSign() const;
1129
1135 int32 GetSignedBitLength() const;
1136
1142 int32 GetSignedByteLength() const;
1143
1149 int32 GetSignedWordLength() const;
1150
1157 int32 GetLength() const;
1158
1165 int32 GetBit(int32 position) const;
1166
1173 uint32 GetUpperWord() const;
1174
1181 uint32 GetWord(int32 index) const;
1182
1191 uint32 FloorLog10() const;
1192
1200 uint32 FloorLog2() const;
1201
1210 float Log10() const;
1211
1220 double Log10D() const;
1221
1227 float Log2() const;
1228
1234 double Log2D() const;
1235
1241 float Loge() const;
1242
1248 double LogeD() const;
1249
1256 float LogX(float base) const;
1257
1264 double LogX(double base) const;
1265
1273 FBigInteger Pow(int32 exponent) const;
1274
1283 FBigInteger Pow(float exponent) const;
1284
1291
1297 bool CanFitIntoInt() const;
1298
1304 bool CanFitIntoUInt() const;
1305
1311 bool CanFitIntoInt64() const;
1312
1318 bool CanFitIntoUInt64() const;
1319
1325 bool CanFitIntoFloat() const;
1326
1332 bool CanFitIntoFloatLossy() const;
1333
1339 bool CanFitIntoDouble() const;
1340
1346 bool CanFitIntoDoubleLossy() const;
1347
1353 bool IsEven() const;
1354
1360 bool IsMinusOne() const;
1361
1367 bool IsNegative() const;
1368
1374 bool IsOdd() const;
1375
1381 bool IsOne() const;
1382
1388 bool IsPositive() const;
1389
1395 bool IsPowerOfTwo() const;
1396
1402 bool IsZero() const;
1403
1412 int32 CompareTo(int32 rhs) const;
1413
1424 int32 CompareTo(uint32 rhs) const;
1425
1434 int32 CompareTo(int64 rhs) const;
1435
1444 int32 CompareTo(uint64 rhs) const;
1445
1454 int32 CompareTo(const FBigInteger& rhs) const;
1455
1464 int32 CompareMagnitudeTo(const FBigInteger& rhs) const;
1465
1471 FString ToString() const;
1472
1478 FString ToHexString() const;
1479
1487 friend FBigInteger operator+(FBigInteger lhs, const FBigInteger& rhs);
1488
1496 friend FBigInteger operator-(FBigInteger lhs, const FBigInteger& rhs);
1497
1505 friend FBigInteger operator*(FBigInteger lhs, const FBigInteger& rhs);
1506
1514 friend FBigInteger operator/(FBigInteger lhs, const uint32 rhs);
1515
1523 friend FBigInteger operator/(FBigInteger lhs, const uint64 rhs);
1524
1532 friend FBigInteger operator/(FBigInteger lhs, const FBigInteger& rhs);
1533
1543 friend uint32 operator%(FBigInteger lhs, const uint32 rhs);
1544
1554 friend uint64 operator%(FBigInteger lhs, const uint64 rhs);
1555
1563 friend FBigInteger operator%(FBigInteger lhs, const FBigInteger& rhs);
1564
1573 friend FBigInteger operator&(FBigInteger lhs, const FBigInteger& rhs);
1574
1583 friend FBigInteger operator|(FBigInteger lhs, const FBigInteger& rhs);
1584
1593 friend FBigInteger operator^(FBigInteger lhs, const FBigInteger& rhs);
1594
1602 friend FBigInteger operator<<(FBigInteger lhs, int32 shift);
1603
1611 friend FBigInteger operator>>(FBigInteger lhs, int32 shift);
1612
1618 FBigInteger operator+() const;
1619
1625 FBigInteger operator-() const;
1626
1633 bool operator!() const;
1634
1645 FBigInteger operator~() const;
1646
1652 FBigInteger& operator++();
1653
1659 FBigInteger operator++(int);
1660
1666 FBigInteger& operator--();
1667
1673 FBigInteger operator--(int);
1674
1681 FBigInteger& operator+=(const FBigInteger& rhs);
1682
1689 FBigInteger& operator-=(const FBigInteger& rhs);
1690
1697 FBigInteger& operator*=(const FBigInteger& rhs);
1698
1705 FBigInteger& operator/=(const uint32 rhs);
1706
1713 FBigInteger& operator/=(const uint64 rhs);
1714
1721 FBigInteger& operator/=(const FBigInteger& rhs);
1722
1729 FBigInteger& operator%=(const FBigInteger& rhs);
1730
1738 FBigInteger& operator&=(const FBigInteger& rhs);
1739
1747 FBigInteger& operator|=(const FBigInteger& rhs);
1748
1756 FBigInteger& operator^=(const FBigInteger& rhs);
1757
1764 FBigInteger& operator>>=(int32 shift);
1765
1772 FBigInteger& operator<<=(int32 shift);
1773
1780 void operator=(bool from);
1781
1788 void operator=(int8 from);
1789
1796 void operator=(uint8 from);
1797
1804 void operator=(int16 from);
1805
1812 void operator=(uint16 from);
1813
1819 void operator=(int32 from);
1820
1826 void operator=(uint32 from);
1827
1833 void operator=(int64 from);
1834
1840 void operator=(uint64 from);
1841
1847 void operator=(float from);
1848
1854 void operator=(double from);
1855
1862 explicit operator bool() const;
1863
1870 explicit operator int8() const;
1871
1878 explicit operator uint8() const;
1879
1886 explicit operator int16() const;
1887
1894 explicit operator uint16() const;
1895
1902 explicit operator int32() const;
1903
1910 explicit operator uint32() const;
1911
1918 explicit operator int64() const;
1919
1926 explicit operator uint64() const;
1927
1934 explicit operator float() const;
1935
1942 explicit operator double() const;
1943
1949 explicit operator TArray<uint8>() const;
1950
1956 explicit operator TArray<uint32>() const;
1957
1958#pragma region OperatorEq
1959
1967 friend bool operator==(int32 lhs, const FBigInteger& rhs);
1968
1976 friend bool operator==(uint32 lhs, const FBigInteger& rhs);
1977
1985 friend bool operator==(int64 lhs, const FBigInteger& rhs);
1986
1994 friend bool operator==(uint64 lhs, const FBigInteger& rhs);
1995
2003 friend bool operator==(const FBigInteger& lhs, int32 rhs);
2004
2012 friend bool operator==(const FBigInteger& lhs, uint32 rhs);
2013
2021 friend bool operator==(const FBigInteger& lhs, int64 rhs);
2022
2030 friend bool operator==(const FBigInteger& lhs, uint64 rhs);
2031
2039 friend bool operator==(const FBigInteger& lhs, const FBigInteger& rhs);
2040
2041#pragma endregion
2042#pragma region OperatorNeq
2043
2051 friend bool operator!=(int32 lhs, const FBigInteger& rhs);
2052
2060 friend bool operator!=(uint32 lhs, const FBigInteger& rhs);
2061
2069 friend bool operator!=(int64 lhs, const FBigInteger& rhs);
2070
2078 friend bool operator!=(uint64 lhs, const FBigInteger& rhs);
2079
2087 friend bool operator!=(const FBigInteger& lhs, int32 rhs);
2088
2096 friend bool operator!=(const FBigInteger& lhs, uint32 rhs);
2097
2105 friend bool operator!=(const FBigInteger& lhs, int64 rhs);
2106
2114 friend bool operator!=(const FBigInteger& lhs, uint64 rhs);
2115
2123 friend bool operator!=(const FBigInteger& lhs, const FBigInteger& rhs);
2124
2125#pragma endregion
2126#pragma region OperatorLt
2127
2135 friend bool operator<(int32 lhs, const FBigInteger& rhs);
2136
2144 friend bool operator<(uint32 lhs, const FBigInteger& rhs);
2145
2153 friend bool operator<(int64 lhs, const FBigInteger& rhs);
2154
2162 friend bool operator<(uint64 lhs, const FBigInteger& rhs);
2163
2171 friend bool operator<(const FBigInteger& lhs, const int32 rhs);
2172
2180 friend bool operator<(const FBigInteger& lhs, const uint32 rhs);
2181
2189 friend bool operator<(const FBigInteger& lhs, const int64 rhs);
2190
2198 friend bool operator<(const FBigInteger& lhs, const uint64 rhs);
2199
2207 friend bool operator<(const FBigInteger& lhs, const FBigInteger& rhs);
2208
2209#pragma endregion
2210#pragma region OperatorGt
2211
2219 friend bool operator>(int32 lhs, const FBigInteger& rhs);
2220
2228 friend bool operator>(uint32 lhs, const FBigInteger& rhs);
2229
2237 friend bool operator>(int64 lhs, const FBigInteger& rhs);
2238
2246 friend bool operator>(uint64 lhs, const FBigInteger& rhs);
2247
2255 friend bool operator>(const FBigInteger& lhs, int32 rhs);
2256
2264 friend bool operator>(const FBigInteger& lhs, uint32 rhs);
2265
2273 friend bool operator>(const FBigInteger& lhs, int64 rhs);
2274
2282 friend bool operator>(const FBigInteger& lhs, uint64 rhs);
2283
2291 friend bool operator>(const FBigInteger& lhs, const FBigInteger& rhs);
2292
2293#pragma endregion
2294#pragma region OperatorLteq
2295
2303 friend bool operator<=(int32 lhs, const FBigInteger& rhs);
2304
2312 friend bool operator<=(uint32 lhs, const FBigInteger& rhs);
2313
2321 friend bool operator<=(int64 lhs, const FBigInteger& rhs);
2322
2330 friend bool operator<=(uint64 lhs, const FBigInteger& rhs);
2331
2339 friend bool operator<=(const FBigInteger& lhs, int32 rhs);
2340
2348 friend bool operator<=(const FBigInteger& lhs, uint32 rhs);
2349
2357 friend bool operator<=(const FBigInteger& lhs, int64 rhs);
2358
2366 friend bool operator<=(const FBigInteger& lhs, uint64 rhs);
2367
2375 friend bool operator<=(const FBigInteger& lhs, const FBigInteger& rhs);
2376
2377#pragma endregion
2378#pragma region OperatorGteq
2379
2387 friend bool operator>=(int32 lhs, const FBigInteger& rhs);
2388
2396 friend bool operator>=(uint32 lhs, const FBigInteger& rhs);
2397
2405 friend bool operator>=(int64 lhs, const FBigInteger& rhs);
2406
2414 friend bool operator>=(uint64 lhs, const FBigInteger& rhs);
2415
2423 friend bool operator>=(const FBigInteger& lhs, int32 rhs);
2424
2432 friend bool operator>=(const FBigInteger& lhs, uint32 rhs);
2433
2441 friend bool operator>=(const FBigInteger& lhs, int64 rhs);
2442
2450 friend bool operator>=(const FBigInteger& lhs, uint64 rhs);
2451
2459 friend bool operator>=(const FBigInteger& lhs, const FBigInteger& rhs);
2460
2461#pragma endregion
2462
2468 void SetValueIn(bool value);
2469
2475 void SetValueIn(int8 value);
2476
2482 void SetValueIn(uint8 value);
2483
2489 void SetValueIn(int16 value);
2490
2496 void SetValueIn(uint16 value);
2497
2503 void SetValueIn(int32 value);
2504
2510 void SetValueIn(uint32 value);
2511
2517 void SetValueIn(int64 value);
2518
2524 void SetValueIn(uint64 value);
2525
2531 void SetValueIn(float value);
2532
2538 void SetValueIn(double value);
2539
2545 void SetValueIn(const FBigInteger& value);
2546
2554 void SetValueIn(const TArray<uint8>& value);
2555
2562 void SetValueIn(const TArray<uint8>& magnitude, bool isNegative);
2563
2571 void SetValueIn(const TArray<uint32>& value);
2572
2579 void SetValueIn(const TArray<uint32>& magnitude, bool isNegative);
2580
2586 void AddIn(const FBigInteger& rhs);
2587
2593 void SubtractIn(const FBigInteger& rhs);
2594
2602
2609 void AndIn(const FBigInteger& rhs);
2610
2617 void OrIn(const FBigInteger& rhs);
2618
2625 void XorIn(const FBigInteger& rhs);
2626
2636 void InvertIn();
2637
2643
2649
2655 void ClearBitIn(int32 bitIndex);
2656
2662 void SetBitIn(int32 bitIndex);
2663
2669 void ToggleBitIn(int32 bitIndex);
2670
2678 void SetWordIn(int32 index, uint32 word);
2679
2685 void ShiftLeftIn(int32 shift);
2686
2692 void ShiftRightIn(int32 shift);
2693
2698 void NegateIn();
2699
2706 void SetSignIn(bool isNegative);
2707
2712 void AbsIn();
2713
2718 void NabsIn();
2719
2725 void CopySignIn(const FBigInteger& rhs);
2726
2732 void MaxIn(const FBigInteger& rhs);
2733
2739 void MinIn(const FBigInteger& rhs);
2740
2746 void MaxMagnitudeIn(const FBigInteger& rhs);
2747
2753 void MinMagnitudeIn(const FBigInteger& rhs);
2754
2762 void SelectIn(const FBigInteger& rhs, bool condition);
2763
2773 void ClampIn(const FBigInteger& min, const FBigInteger& max);
2774
2775private:
2781 void SetValueIn(const TArray<uint32>& magnitude, int32 sign);
2782
2783 void AddCore(const FBigInteger& V, int32 length);
2784 static uint32 AddCarry(uint32* u1, uint32 u2, uint32 uCarry);
2785 static uint32 AddCarry(uint32* u1, uint32 uCarry);
2786
2787 void SubtractCore(const FBigInteger& V, int32 length);
2788 static uint32 SubBorrow(uint32* u1, uint32 u2, uint32 uBorrow);
2789 static uint32 SubBorrow(uint32* u1, uint32 uBorrow);
2790
2791 static bool DivideGuessTooBig(uint64 q, uint64 valHi, uint32 valLo, uint32 divHi, uint32 divLo);
2792 static uint32 AddDivisor(uint32* left, int32 leftLength, const uint32* right, int32 rightLength);
2793 static uint32 SubtractDivisor(uint32* left, int leftLength, const uint32* right, int rightLength, uint64 q);
2794 static FBigInteger GcdLehmer(const FBigInteger& lhs, const FBigInteger& rhs);
2795 static void GcdExtractDigits(const FBigInteger& lhs, const FBigInteger& rhs, uint64& x, uint64& y);
2796 static bool GcdLehmerIteration(uint64& x, uint64& y, uint32& a, uint32& b, uint32& c, uint32& d, int32& iteration);
2797 static int32 GcdGuessLehmer(const FBigInteger& lhs, const FBigInteger& rhs, uint32& a, uint32& b, uint32& c, uint32& d);
2798 static void GcdLehmerCore(FBigInteger& lhs, FBigInteger& rhs, uint32& a, uint32& b, uint32& c, uint32& d, int32 iteration);
2799
2800 void DecrementCore();
2801 void IncrementCore();
2802
2803 void SetSignInCore(int32 value);
2804
2805 uint32 GetBitsOrZero(int32 index) const;
2806 void EnsureLength(int32 length);
2807 void Trim();
2808
2809 static const int32 bitsPerUnit = 32;
2810};
2811
2812// If conditional inlining is ON, include inlinable functions here.
2813#if DBN_INLINE_ENABLED
2814#include "BigInteger.inl"
2815#endif
Definition: BigInteger.h:50
void SetValueIn(const TArray< uint8 > &magnitude, bool isNegative)
bool CanFitIntoInt() const
FBigInteger Pow(float exponent) const
uint32 DivRem(const uint32 divisor, FBigInteger &quotient) const
void GetBaseTwoComponents(uint32 &mantissa, int32 &exponent) const
void SetValueIn(double value)
void AddIn(const FBigInteger &rhs)
void ToggleBitIn(int32 bitIndex)
void SetValueIn(int32 value)
int32 CompareTo(uint64 rhs) const
void OrIn(const FBigInteger &rhs)
void SubtractIn(const FBigInteger &rhs)
void ShiftRightIn(int32 shift)
uint32 FloorLog10() const
int32 Pop() const
void SetValueIn(int64 value)
uint64 DivRem(const uint64 divisor, FBigInteger &quotient) const
float LogX(float base) const
void AndIn(const FBigInteger &rhs)
bool CanFitIntoUInt64() const
uint32 FloorLog2() const
int32 CompareTo(int64 rhs) const
void ShiftLeftIn(int32 shift)
void SetValueIn(const TArray< uint32 > &value)
int32 CompareMagnitudeTo(const FBigInteger &rhs) const
void SetValueIn(const TArray< uint32 > &magnitude, bool isNegative)
void SetWordIn(int32 index, uint32 word)
int32 CompareTo(uint32 rhs) const
void SetValueIn(uint32 value)
void ClearBitIn(int32 bitIndex)
void XorIn(const FBigInteger &rhs)
FBigInteger Sqrt() const
FString ToString() const
void SetBitIn(int32 bitIndex)
FString ToHexString() const
void SetValueIn(const TArray< uint8 > &value)
void SetValueIn(uint64 value)
static FBigInteger Gcd(const FBigInteger &lhs, const FBigInteger &rhs)
bool CanFitIntoInt64() const
FBigInteger Multiply(const FBigInteger &rhs) const
int32 CompareTo(const FBigInteger &rhs) const
double LogX(double base) const
static const FBigInteger Zero
Definition: BigInteger.h:179
int32 CompareTo(int32 rhs) const
void DecrementIn()
void InvertIn()
static const FBigInteger One
Definition: BigInteger.h:185
void IncrementIn()
FBigInteger Pow(int32 exponent) const
int32 GetSignedBitLength() const
FBigInteger DivRemIn(const FBigInteger &divisor)
int32 Ntz() const
void GetBaseTwoComponents(uint64 &mantissa, int32 &exponent) const
static const FBigInteger MinusOne
Definition: BigInteger.h:191
void SetValueIn(float value)