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
FBigInteger Struct Reference

#include "BigInteger.h"

Public Member Functions

 FBigInteger ()
 
 FBigInteger (bool value)
 
 FBigInteger (int8 value)
 
 FBigInteger (uint8 value)
 
 FBigInteger (int16 value)
 
 FBigInteger (uint16 value)
 
 FBigInteger (int32 value)
 
 FBigInteger (uint32 value)
 
 FBigInteger (int64 value)
 
 FBigInteger (uint64 value)
 
 FBigInteger (float value)
 
 FBigInteger (double value)
 
 FBigInteger (const TArray< uint8 > &value)
 
 FBigInteger (const TArray< uint8 > &magnitude, bool isNegative)
 
 FBigInteger (const TArray< uint32 > &value)
 
 FBigInteger (const TArray< uint32 > &magnitude, bool isNegative)
 
FBigInteger Add (const FBigInteger &rhs) const
 
FBigInteger Subtract (const FBigInteger &rhs) const
 
FBigInteger Multiply (const FBigInteger &rhs) const
 
FBigInteger Divide (uint32 rhs) const
 
FBigInteger Divide (uint64 rhs) const
 
FBigInteger Divide (const FBigInteger &rhs) const
 
uint32 Remainder (uint32 rhs) const
 
uint64 Remainder (uint64 rhs) const
 
FBigInteger Remainder (const FBigInteger &rhs) const
 
uint32 DivRem (const uint32 divisor, FBigInteger &quotient) const
 
uint64 DivRem (const uint64 divisor, FBigInteger &quotient) const
 
FBigInteger DivRem (const FBigInteger &divisor, FBigInteger &quotient) const
 
FBigInteger And (const FBigInteger &rhs) const
 
FBigInteger Or (const FBigInteger &rhs) const
 
FBigInteger Xor (const FBigInteger &rhs) const
 
FBigInteger Invert () const
 
FBigInteger Increment () const
 
FBigInteger Decrement () const
 
FBigInteger ClearBit (int32 bitIndex) const
 
FBigInteger SetBit (int32 bitIndex) const
 
FBigInteger ToggleBit (int32 bitIndex) const
 
FBigInteger SetWord (int32 index, uint32 word) const
 
FBigInteger ShiftLeft (int32 shift) const
 
FBigInteger ShiftRight (int32 shift) const
 
FBigInteger Negate () const
 
FBigInteger SetSign (bool isNegative) const
 
FBigInteger Abs () const
 
FBigInteger Nabs () const
 
FBigInteger CopySign (const FBigInteger &rhs) const
 
const FBigIntegerClamp (const FBigInteger &min, const FBigInteger &max) const
 
int32 CountPrecisionBits () const
 
int32 Nlz () const
 
int32 Ntz () const
 
int32 Pop () const
 
void GetBaseTwoComponents (uint32 &mantissa, int32 &exponent) const
 
void GetBaseTwoComponents (uint64 &mantissa, int32 &exponent) const
 
int32 GetSign () const
 
int32 GetSignedBitLength () const
 
int32 GetSignedByteLength () const
 
int32 GetSignedWordLength () const
 
int32 GetLength () const
 
int32 GetBit (int32 position) const
 
uint32 GetUpperWord () const
 
uint32 GetWord (int32 index) const
 
uint32 FloorLog10 () const
 
uint32 FloorLog2 () const
 
float Log10 () const
 
double Log10D () const
 
float Log2 () const
 
double Log2D () const
 
float Loge () const
 
double LogeD () const
 
float LogX (float base) const
 
double LogX (double base) const
 
FBigInteger Pow (int32 exponent) const
 
FBigInteger Pow (float exponent) const
 
FBigInteger Sqrt () const
 
bool CanFitIntoInt () const
 
bool CanFitIntoUInt () const
 
bool CanFitIntoInt64 () const
 
bool CanFitIntoUInt64 () const
 
bool CanFitIntoFloat () const
 
bool CanFitIntoFloatLossy () const
 
bool CanFitIntoDouble () const
 
bool CanFitIntoDoubleLossy () const
 
bool IsEven () const
 
bool IsMinusOne () const
 
bool IsNegative () const
 
bool IsOdd () const
 
bool IsOne () const
 
bool IsPositive () const
 
bool IsPowerOfTwo () const
 
bool IsZero () const
 
int32 CompareTo (int32 rhs) const
 
int32 CompareTo (uint32 rhs) const
 
int32 CompareTo (int64 rhs) const
 
int32 CompareTo (uint64 rhs) const
 
int32 CompareTo (const FBigInteger &rhs) const
 
int32 CompareMagnitudeTo (const FBigInteger &rhs) const
 
FString ToString () const
 
FString ToHexString () const
 
FBigInteger operator+ () const
 
FBigInteger operator- () const
 
bool operator! () const
 
FBigInteger operator~ () const
 
FBigIntegeroperator++ ()
 
FBigInteger operator++ (int)
 
FBigIntegeroperator-- ()
 
FBigInteger operator-- (int)
 
FBigIntegeroperator+= (const FBigInteger &rhs)
 
FBigIntegeroperator-= (const FBigInteger &rhs)
 
FBigIntegeroperator*= (const FBigInteger &rhs)
 
FBigIntegeroperator/= (const uint32 rhs)
 
FBigIntegeroperator/= (const uint64 rhs)
 
FBigIntegeroperator/= (const FBigInteger &rhs)
 
FBigIntegeroperator%= (const FBigInteger &rhs)
 
FBigIntegeroperator&= (const FBigInteger &rhs)
 
FBigIntegeroperator|= (const FBigInteger &rhs)
 
FBigIntegeroperator^= (const FBigInteger &rhs)
 
FBigIntegeroperator>>= (int32 shift)
 
FBigIntegeroperator<<= (int32 shift)
 
void operator= (bool from)
 
void operator= (int8 from)
 
void operator= (uint8 from)
 
void operator= (int16 from)
 
void operator= (uint16 from)
 
void operator= (int32 from)
 
void operator= (uint32 from)
 
void operator= (int64 from)
 
void operator= (uint64 from)
 
void operator= (float from)
 
void operator= (double from)
 
 operator bool () const
 
 operator int8 () const
 
 operator uint8 () const
 
 operator int16 () const
 
 operator uint16 () const
 
 operator int32 () const
 
 operator uint32 () const
 
 operator int64 () const
 
 operator uint64 () const
 
 operator float () const
 
 operator double () const
 
 operator TArray< uint8 > () const
 
 operator TArray< uint32 > () const
 
void SetValueIn (bool value)
 
void SetValueIn (int8 value)
 
void SetValueIn (uint8 value)
 
void SetValueIn (int16 value)
 
void SetValueIn (uint16 value)
 
void SetValueIn (int32 value)
 
void SetValueIn (uint32 value)
 
void SetValueIn (int64 value)
 
void SetValueIn (uint64 value)
 
void SetValueIn (float value)
 
void SetValueIn (double value)
 
void SetValueIn (const FBigInteger &value)
 
void SetValueIn (const TArray< uint8 > &value)
 
void SetValueIn (const TArray< uint8 > &magnitude, bool isNegative)
 
void SetValueIn (const TArray< uint32 > &value)
 
void SetValueIn (const TArray< uint32 > &magnitude, bool isNegative)
 
void AddIn (const FBigInteger &rhs)
 
void SubtractIn (const FBigInteger &rhs)
 
FBigInteger DivRemIn (const FBigInteger &divisor)
 
void AndIn (const FBigInteger &rhs)
 
void OrIn (const FBigInteger &rhs)
 
void XorIn (const FBigInteger &rhs)
 
void InvertIn ()
 
void IncrementIn ()
 
void DecrementIn ()
 
void ClearBitIn (int32 bitIndex)
 
void SetBitIn (int32 bitIndex)
 
void ToggleBitIn (int32 bitIndex)
 
void SetWordIn (int32 index, uint32 word)
 
void ShiftLeftIn (int32 shift)
 
void ShiftRightIn (int32 shift)
 
void NegateIn ()
 
void SetSignIn (bool isNegative)
 
void AbsIn ()
 
void NabsIn ()
 
void CopySignIn (const FBigInteger &rhs)
 
void MaxIn (const FBigInteger &rhs)
 
void MinIn (const FBigInteger &rhs)
 
void MaxMagnitudeIn (const FBigInteger &rhs)
 
void MinMagnitudeIn (const FBigInteger &rhs)
 
void SelectIn (const FBigInteger &rhs, bool condition)
 
void ClampIn (const FBigInteger &min, const FBigInteger &max)
 

Static Public Member Functions

static FBigInteger Add (const FBigInteger &lhs, const FBigInteger &rhs)
 
static FBigInteger Subtract (const FBigInteger &lhs, const FBigInteger &rhs)
 
static FBigInteger Multiply (const FBigInteger &lhs, const FBigInteger &rhs)
 
static FBigInteger Divide (const FBigInteger &lhs, uint32 rhs)
 
static FBigInteger Divide (const FBigInteger &lhs, uint64 rhs)
 
static FBigInteger Divide (const FBigInteger &lhs, const FBigInteger &rhs)
 
static uint32 Remainder (const FBigInteger &lhs, const uint32 rhs)
 
static uint64 Remainder (const FBigInteger &lhs, const uint64 rhs)
 
static FBigInteger Remainder (const FBigInteger &lhs, const FBigInteger &rhs)
 
static uint32 DivRem (const FBigInteger &lhs, uint32 rhs, FBigInteger &quotient)
 
static uint64 DivRem (const FBigInteger &lhs, uint64 rhs, FBigInteger &quotient)
 
static FBigInteger DivRem (const FBigInteger &lhs, const FBigInteger &rhs, FBigInteger &quotient)
 
static FBigInteger And (const FBigInteger &lhs, const FBigInteger &rhs)
 
static FBigInteger Or (const FBigInteger &lhs, const FBigInteger &rhs)
 
static FBigInteger Xor (const FBigInteger &lhs, const FBigInteger &rhs)
 
static FBigInteger Invert (const FBigInteger &value)
 
static FBigInteger Increment (const FBigInteger &value)
 
static FBigInteger Decrement (const FBigInteger &value)
 
static FBigInteger ClearBit (const FBigInteger &value, int32 bitIndex)
 
static FBigInteger SetBit (const FBigInteger &value, int32 bitIndex)
 
static FBigInteger ToggleBit (const FBigInteger &value, int32 bitIndex)
 
static FBigInteger SetWord (const FBigInteger &value, int32 index, uint32 word)
 
static FBigInteger ShiftLeft (const FBigInteger &value, int32 shift)
 
static FBigInteger ShiftRight (const FBigInteger &value, int32 shift)
 
static FBigInteger Negate (const FBigInteger &value)
 
static FBigInteger SetSign (const FBigInteger &value, bool isNegative)
 
static FBigInteger Abs (const FBigInteger &value)
 
static FBigInteger Nabs (const FBigInteger &value)
 
static FBigInteger CopySign (const FBigInteger &lhs, const FBigInteger &rhs)
 
static const FBigIntegerMax (const FBigInteger &lhs, const FBigInteger &rhs)
 
static const FBigIntegerMaxMagnitude (const FBigInteger &lhs, const FBigInteger &rhs)
 
static const FBigIntegerMin (const FBigInteger &lhs, const FBigInteger &rhs)
 
static const FBigIntegerMinMagnitude (const FBigInteger &lhs, const FBigInteger &rhs)
 
static const FBigIntegerSelect (const FBigInteger &whenTrue, const FBigInteger &whenFalse, bool condition)
 
static const FBigIntegerClamp (const FBigInteger &value, const FBigInteger &min, const FBigInteger &max)
 
static int32 CountPrecisionBits (const FBigInteger &value)
 
static int32 Nlz (const FBigInteger &value)
 
static int32 Ntz (const FBigInteger &value)
 
static int32 Pop (const FBigInteger &value)
 
static int32 Compare (int32 lhs, const FBigInteger &rhs)
 
static int32 Compare (uint32 lhs, const FBigInteger &rhs)
 
static int32 Compare (int64 lhs, const FBigInteger &rhs)
 
static int32 Compare (uint64 lhs, const FBigInteger &rhs)
 
static int32 Compare (const FBigInteger &lhs, int32 rhs)
 
static int32 Compare (const FBigInteger &lhs, uint32 rhs)
 
static int32 Compare (const FBigInteger &lhs, int64 rhs)
 
static int32 Compare (const FBigInteger &lhs, uint64 rhs)
 
static int32 Compare (const FBigInteger &lhs, const FBigInteger &rhs)
 
static int32 CompareMagnitude (const FBigInteger &lhs, const FBigInteger &rhs)
 
static uint32 FloorLog10 (const FBigInteger &value)
 
static uint32 FloorLog2 (const FBigInteger &value)
 
static float Log10 (const FBigInteger &value)
 
static double Log10D (const FBigInteger &value)
 
static float Log2 (const FBigInteger &value)
 
static double Log2D (const FBigInteger &value)
 
static float Loge (const FBigInteger &value)
 
static double LogeD (const FBigInteger &value)
 
static float LogX (float base, const FBigInteger &value)
 
static double LogX (double base, const FBigInteger &value)
 
static FBigInteger Pow (int32 base, int32 exponent)
 
static FBigInteger Pow (const FBigInteger &base, int32 exponent)
 
static FBigInteger Pow (const FBigInteger &base, float exponent)
 
static FBigInteger Sqrt (const FBigInteger &value)
 
static uint32 Gcd (const FBigInteger &lhs, uint32 rhs)
 
static uint64 Gcd (const FBigInteger &lhs, uint64 rhs)
 
static FBigInteger Gcd (const FBigInteger &lhs, const FBigInteger &rhs)
 

Static Public Attributes

static const FBigInteger Zero
 
static const FBigInteger One
 
static const FBigInteger MinusOne
 

Friends

FBigInteger operator+ (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator- (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator* (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator/ (FBigInteger lhs, const uint32 rhs)
 
FBigInteger operator/ (FBigInteger lhs, const uint64 rhs)
 
FBigInteger operator/ (FBigInteger lhs, const FBigInteger &rhs)
 
uint32 operator% (FBigInteger lhs, const uint32 rhs)
 
uint64 operator% (FBigInteger lhs, const uint64 rhs)
 
FBigInteger operator% (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator& (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator| (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator^ (FBigInteger lhs, const FBigInteger &rhs)
 
FBigInteger operator<< (FBigInteger lhs, int32 shift)
 
FBigInteger operator>> (FBigInteger lhs, int32 shift)
 
bool operator== (int32 lhs, const FBigInteger &rhs)
 
bool operator== (uint32 lhs, const FBigInteger &rhs)
 
bool operator== (int64 lhs, const FBigInteger &rhs)
 
bool operator== (uint64 lhs, const FBigInteger &rhs)
 
bool operator== (const FBigInteger &lhs, int32 rhs)
 
bool operator== (const FBigInteger &lhs, uint32 rhs)
 
bool operator== (const FBigInteger &lhs, int64 rhs)
 
bool operator== (const FBigInteger &lhs, uint64 rhs)
 
bool operator== (const FBigInteger &lhs, const FBigInteger &rhs)
 
bool operator!= (int32 lhs, const FBigInteger &rhs)
 
bool operator!= (uint32 lhs, const FBigInteger &rhs)
 
bool operator!= (int64 lhs, const FBigInteger &rhs)
 
bool operator!= (uint64 lhs, const FBigInteger &rhs)
 
bool operator!= (const FBigInteger &lhs, int32 rhs)
 
bool operator!= (const FBigInteger &lhs, uint32 rhs)
 
bool operator!= (const FBigInteger &lhs, int64 rhs)
 
bool operator!= (const FBigInteger &lhs, uint64 rhs)
 
bool operator!= (const FBigInteger &lhs, const FBigInteger &rhs)
 
bool operator< (int32 lhs, const FBigInteger &rhs)
 
bool operator< (uint32 lhs, const FBigInteger &rhs)
 
bool operator< (int64 lhs, const FBigInteger &rhs)
 
bool operator< (uint64 lhs, const FBigInteger &rhs)
 
bool operator< (const FBigInteger &lhs, const int32 rhs)
 
bool operator< (const FBigInteger &lhs, const uint32 rhs)
 
bool operator< (const FBigInteger &lhs, const int64 rhs)
 
bool operator< (const FBigInteger &lhs, const uint64 rhs)
 
bool operator< (const FBigInteger &lhs, const FBigInteger &rhs)
 
bool operator> (int32 lhs, const FBigInteger &rhs)
 
bool operator> (uint32 lhs, const FBigInteger &rhs)
 
bool operator> (int64 lhs, const FBigInteger &rhs)
 
bool operator> (uint64 lhs, const FBigInteger &rhs)
 
bool operator> (const FBigInteger &lhs, int32 rhs)
 
bool operator> (const FBigInteger &lhs, uint32 rhs)
 
bool operator> (const FBigInteger &lhs, int64 rhs)
 
bool operator> (const FBigInteger &lhs, uint64 rhs)
 
bool operator> (const FBigInteger &lhs, const FBigInteger &rhs)
 
bool operator<= (int32 lhs, const FBigInteger &rhs)
 
bool operator<= (uint32 lhs, const FBigInteger &rhs)
 
bool operator<= (int64 lhs, const FBigInteger &rhs)
 
bool operator<= (uint64 lhs, const FBigInteger &rhs)
 
bool operator<= (const FBigInteger &lhs, int32 rhs)
 
bool operator<= (const FBigInteger &lhs, uint32 rhs)
 
bool operator<= (const FBigInteger &lhs, int64 rhs)
 
bool operator<= (const FBigInteger &lhs, uint64 rhs)
 
bool operator<= (const FBigInteger &lhs, const FBigInteger &rhs)
 
bool operator>= (int32 lhs, const FBigInteger &rhs)
 
bool operator>= (uint32 lhs, const FBigInteger &rhs)
 
bool operator>= (int64 lhs, const FBigInteger &rhs)
 
bool operator>= (uint64 lhs, const FBigInteger &rhs)
 
bool operator>= (const FBigInteger &lhs, int32 rhs)
 
bool operator>= (const FBigInteger &lhs, uint32 rhs)
 
bool operator>= (const FBigInteger &lhs, int64 rhs)
 
bool operator>= (const FBigInteger &lhs, uint64 rhs)
 
bool operator>= (const FBigInteger &lhs, const FBigInteger &rhs)
 

Detailed Description

Represents and performs operations on integer values of arbitrary scale.

This structure is akin to the C# System.Numerics.BigInteger class. It has some important design differences to help reduce memory allocations - notably this class does not use a register/builder class behind the scenes for calculation and it instead uses its own bit storage as a register for operations, avoiding allocations and copies where possible.

Supports basic aritmetic operations up through exponents and roots. Yes, unlike C# BigInteger, arbitrary roots and float exponents are possible (though slow) with this class.

Note
BigIntegers are not magic and operations WILL NOT be as fast as operations on native types. Speed of operations slows as numbers get larger. As a rule of thumb, every 3 decimal orders of magnitude will increase the bit size of numbers by just a hair less than 10 bits. (10^3 ~= 10 bits, 10^6 ~= 20 bits, 10^9 ~= 30 bits, etc.).
Add and Subtract have O(n) complexity, where N is the number of 32-bit words in the BigInteger. Multiply has O(n^2) complexity. It goes downhill from there, unfortunately...
Many operations support both an instance method version and a static method version. Many methods are also mapped to operators.
While BigInteger's default method of operation tends toward immutability, BigInteger is not dogmatic about being immutable, and some simple operations have versions that support modifying the instance's value, rather than copying to a result. These methods are named with the suffix 'In', for example, SetValueIn(), AddIn(), ShiftIn(), etc. Note that this is only available for operations for which the first operand can be overwritten during the calculation process. For example, Multiply does not qualify for having a MultiplyIn variant, because the values of both operands must be preserved during the operation.
As of now, no implementation of bitwise rotate is being provided. To me it just does not make sense conceptually. What is the correct left boundary for rotation? The highest set bit? The next byte boundary? The next word boundary? Then what about the case where a number is rotated such that the result is trimmed and high bytes that once contained bits are now fully zero? It results in situations where two subsequent rotate operations are not commutative as expected. For example, RotateRight(RotateRight((1 << 95), 32), 80) != RotateRight(RotateRight((1 << 96), 80), 32).

Constructor & Destructor Documentation

◆ FBigInteger() [1/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( )
Flavor:Constructor

Initializes a BigInteger

Implements Opcode:
Flavor:Constructor BI ← bi 0

◆ FBigInteger() [2/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( bool  value)
explicitFlavor:Constructor

Initializes a BigInteger from a bool value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi B

◆ FBigInteger() [3/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( int8  value)
Flavor:Constructor

Initializes a BigInteger from an int8 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi I1

◆ FBigInteger() [4/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( uint8  value)
Flavor:Constructor

Initializes a BigInteger from a uint8 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi U1

◆ FBigInteger() [5/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( int16  value)
Flavor:Constructor

Initializes a BigInteger from an int16 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi I2

◆ FBigInteger() [6/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( uint16  value)
Flavor:Constructor

Initializes a BigInteger from a uint16 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi U2

◆ FBigInteger() [7/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( int32  value)
Flavor:Constructor

Initializes a BigInteger from a int32 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi I4

◆ FBigInteger() [8/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( uint32  value)
Flavor:Constructor

Initializes a BigInteger from a uint32 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi U4

◆ FBigInteger() [9/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( int64  value)
Flavor:Constructor

Initializes a BigInteger from a int64 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi I8

◆ FBigInteger() [10/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( uint64  value)
explicitFlavor:Constructor

Initializes a BigInteger from a uint64 value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi U8

◆ FBigInteger() [11/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( float  value)
Flavor:Constructor

Initializes a BigInteger from a float value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi F4

◆ FBigInteger() [12/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( double  value)
Flavor:Constructor

Initializes a BigInteger from a double value

Parameters
valueThe value with which to initialize the BigInteger
Implements Opcode:
Flavor:Constructor BI ← bi F8

◆ FBigInteger() [13/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( const TArray< uint8 > &  value)
explicitFlavor:Constructor

Initializes a BigInteger from a TArray<uint8>

Parameters
valueThe word values with which to initialize the BigInteger
Note
value is treated as a twos-complement signed number. If negative, the absolute value will be stored and the sign set appropriately
Implements Opcode:
Flavor:Constructor BI ← bi U1[]

◆ FBigInteger() [14/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( const TArray< uint8 > &  magnitude,
bool  isNegative 
)
Flavor:Constructor

Initializes a BigInteger from a TArray<uint8>

Parameters
magnitudeThe magnitude with which to initialize the BigInteger
isNegativeWhether the number should be negative
Implements Opcode:
Flavor:Constructor BI ← bi U1[] B

◆ FBigInteger() [15/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( const TArray< uint32 > &  value)
explicitFlavor:Constructor

Initializes a BigInteger from a TArray<uint32>

Parameters
valueThe word values with which to initialize the BigInteger
Note
value is treated as a twos-complement signed number. If negative, the absolute value will be stored and the sign set appropriately
Implements Opcode:
Flavor:Constructor BI ← bi U4[]

◆ FBigInteger() [16/16]

DBN_FORCEINLINE FBigInteger::FBigInteger ( const TArray< uint32 > &  magnitude,
bool  isNegative 
)
Flavor:Constructor

Initializes a BigInteger from a TArray<uint32>

Parameters
magnitudeThe magnitude with which to initialize the BigInteger
isNegativeWhether the number should be negative
Implements Opcode:
Flavor:Constructor BI ← bi U4[] B

Member Function Documentation

◆ Abs() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Abs ( ) const
Flavor:Instance

Computes the absolute value of the number

Returns
The absolute value of the number
Implements Opcode:
Flavor:Instance BI ← abs BI

◆ Abs() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Abs ( const FBigInteger value)
staticFlavor:Static

Copies value, computes the absolute value on the copy, and returns the copy

Parameters
valueThe number for which to compute the absolute value
Returns
The absolute value of the number
Implements Opcode:
Flavor:Static BI ← abs BI

◆ AbsIn()

DBN_FORCEINLINE void FBigInteger::AbsIn ( )
Flavor:Mutating

Sets the sign of this number to positive

Implements Opcode:
Flavor:Mutating 0 ← abs BI

◆ Add() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Add ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Adds the two values and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed sum of the addition
Implements Opcode:
Flavor:Static BI ← add BI BI

◆ Add() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Add ( const FBigInteger rhs) const
Flavor:Instance

Adds another value to this one and returns the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed sum of the addition
Implements Opcode:
Flavor:Instance BI ← add BI BI

◆ AddIn()

void FBigInteger::AddIn ( const FBigInteger rhs)
Flavor:Mutating

Adds another BigInteger to this one, overwriting this instance with the result.

Parameters
rhsThe value for the right hand side of this operation
Implements Opcode:
Flavor:Mutating 0 ← add BI BI

◆ And() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::And ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Logically ANDs lhs and rhs and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ANDed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Static BI ← and BI BI

◆ And() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::And ( const FBigInteger rhs) const
Flavor:Instance

Logically ANDs this number with rhs and returns the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ANDed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Instance BI ← and BI BI

◆ AndIn()

void FBigInteger::AndIn ( const FBigInteger rhs)
Flavor:Mutating

Logically ANDs another BigInteger with this one, overwriting this instance with the result.

Parameters
rhsThe value for the right hand side of this operation
Note
Sign is treated as another bit logically ANDed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Mutating 0 ← and BI BI

◆ CanFitIntoDouble()

DBN_FORCEINLINE bool FBigInteger::CanFitIntoDouble ( ) const
Flavor:Instance

Gets whether the number can be cast to a double without loss of information

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fitf8 BI

◆ CanFitIntoDoubleLossy()

DBN_FORCEINLINE bool FBigInteger::CanFitIntoDoubleLossy ( ) const
Flavor:Instance

Gets whether the number can be cast to a double without overflow, but while possibly losing precision

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fitlf8 BI

◆ CanFitIntoFloat()

DBN_FORCEINLINE bool FBigInteger::CanFitIntoFloat ( ) const
Flavor:Instance

Gets whether the number can be cast to a float without loss of information

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fitf4 BI

◆ CanFitIntoFloatLossy()

DBN_FORCEINLINE bool FBigInteger::CanFitIntoFloatLossy ( ) const
Flavor:Instance

Gets whether the number can be cast to a float without overflow, but while possibly losing precision

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fitlf4 BI

◆ CanFitIntoInt()

bool FBigInteger::CanFitIntoInt ( ) const
Flavor:Instance

Gets whether the number can be cast to an int32 without loss of information

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fiti4 BI

◆ CanFitIntoInt64()

bool FBigInteger::CanFitIntoInt64 ( ) const
Flavor:Instance

Gets whether the number can be cast to an int64 without loss of information

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fiti8 BI

◆ CanFitIntoUInt()

DBN_FORCEINLINE bool FBigInteger::CanFitIntoUInt ( ) const
Flavor:Instance

Gets whether the number can be cast to a uint32 without loss of information

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fitu4 BI

◆ CanFitIntoUInt64()

bool FBigInteger::CanFitIntoUInt64 ( ) const
Flavor:Instance

Gets whether the number can be cast to a uint64 without loss of information

Returns
True if the value can fit into the specified type, otherwise false
Implements Opcode:
Flavor:Instance B ← fitu8 BI

◆ Clamp() [1/2]

DBN_FORCEINLINE const FBigInteger & FBigInteger::Clamp ( const FBigInteger min,
const FBigInteger max 
) const
Flavor:Instance

Constrains the value to be within min and max

Parameters
minThe minimum desired value
maxThe maximum desired value
Returns
If value is less than min, min is returned. If value is greater than max, max is returned. Otherwise, value is returned.
Implements Opcode:
Flavor:Instance BI ← clamp BI BI BI

◆ Clamp() [2/2]

DBN_FORCEINLINE const FBigInteger & FBigInteger::Clamp ( const FBigInteger value,
const FBigInteger min,
const FBigInteger max 
)
staticFlavor:Static

Constrains the value to be within min and max

Parameters
valueThe value to check and constrain
minThe minimum desired value
maxThe maximum desired value
Returns
If value is less than min, min is returned. If value is greater than max, max is returned. Otherwise, value is returned.
Implements Opcode:
Flavor:Static BI ← clamp BI BI BI

◆ ClampIn()

DBN_FORCEINLINE void FBigInteger::ClampIn ( const FBigInteger min,
const FBigInteger max 
)
Flavor:Mutating

Clamps this betwen min and max If the value of this is less than min, the value of this is set to min. If the value of this is greater than max, the value of this is set to max. Otherwise, this is unmodified.

Parameters
minThe number to use as the minimum bound
maxThe number to use as the minimum bound
Implements Opcode:
Flavor:Mutating 0 ← clamp BI BI BI

◆ ClearBit() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ClearBit ( const FBigInteger value,
int32  bitIndex 
)
staticFlavor:Static

Returns a new number copied from value, with the specified bit cleared

Parameters
valueThe value to copy and modify
bitIndexThe index of the bit to modify
Returns
The new number with the specified bit cleared
Implements Opcode:
Flavor:Static BI ← clrbit BI I4

◆ ClearBit() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ClearBit ( int32  bitIndex) const
Flavor:Instance

Returns a new number with the specified bit cleared

Parameters
bitIndexThe index of the bit to modify
Returns
The new number with the specified bit cleared
Implements Opcode:
Flavor:Instance BI ← clrbit BI I4

◆ ClearBitIn()

void FBigInteger::ClearBitIn ( int32  bitIndex)
Flavor:Mutating

Clears the specified bit in this number

Parameters
bitIndexThe index of the bit to modify
Implements Opcode:
Flavor:Mutating 0 ← clrbit BI I4

◆ Compare() [1/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp BI BI

◆ Compare() [2/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( const FBigInteger lhs,
int32  rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp BI I4

◆ Compare() [3/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( const FBigInteger lhs,
int64  rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp BI I8

◆ Compare() [4/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( const FBigInteger lhs,
uint32  rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp BI U4

◆ Compare() [5/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( const FBigInteger lhs,
uint64  rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp BI U8

◆ Compare() [6/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( int32  lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp I4 BI

◆ Compare() [7/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( int64  lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp I8 BI

◆ Compare() [8/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( uint32  lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp U4 BI

◆ Compare() [9/9]

DBN_FORCEINLINE int32 FBigInteger::Compare ( uint64  lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Compares two numbers and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if the lhs value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Static I4 ← cmp U8 BI

◆ CompareMagnitude()

DBN_FORCEINLINE int32 FBigInteger::CompareMagnitude ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Compares the magnitude of two numbers disregarding sign, and provides the result as a standard three-way comparison value

Parameters
lhsThe number for the left side of the comparison
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value's magnitude is greater, negative if the rhs value's magnitude is greater, or zero if the values' magnitudes are equal.
Implements Opcode:
Flavor:Static I4 ← cmpmag BI BI

◆ CompareMagnitudeTo()

int32 FBigInteger::CompareMagnitudeTo ( const FBigInteger rhs) const
Flavor:Instance

Compares the magnitude of this number to another number disregarding sign, and provides the result as a standard three-way comparison value

Parameters
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value's magnitude is greater, negative if the rhs value's magnitude is greater, or zero if the values' magnitudes are equal.
Implements Opcode:
Flavor:Instance I4 ← cmpmag BI BI

◆ CompareTo() [1/5]

int32 FBigInteger::CompareTo ( const FBigInteger rhs) const
Flavor:Instance

Compares this number to another number and provides the result as a standard three-way comparison value

Parameters
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Instance I4 ← cmp BI BI

◆ CompareTo() [2/5]

int32 FBigInteger::CompareTo ( int32  rhs) const
Flavor:Instance

Compares this number to another number and provides the result as a standard three-way comparison value

Parameters
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Instance I4 ← cmp BI I4

◆ CompareTo() [3/5]

int32 FBigInteger::CompareTo ( int64  rhs) const
Flavor:Instance

Compares this number to another number and provides the result as a standard three-way comparison value

Parameters
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Instance I4 ← cmp BI I8

◆ CompareTo() [4/5]

int32 FBigInteger::CompareTo ( uint32  rhs) const
Flavor:Instance

Compares this number to another number and provides the result as a standard three-way comparison value

Parameters
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value is greater, negative if the rhs value is greater, or zero if the values are equal.
Note
This is a bit faster than other intrinsic integer type compares, because uint32 is the internal storage type for words within the BigInteger.
Implements Opcode:
Flavor:Instance I4 ← cmp BI U4

◆ CompareTo() [5/5]

int32 FBigInteger::CompareTo ( uint64  rhs) const
Flavor:Instance

Compares this number to another number and provides the result as a standard three-way comparison value

Parameters
rhsThe number for the right side of the comparison
Returns
The result of the comparison; positive if this value is greater, negative if the rhs value is greater, or zero if the values are equal.
Implements Opcode:
Flavor:Instance I4 ← cmp BI U8

◆ CopySign() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::CopySign ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Takes the magnitude of lhs and writes the sign from rhs to it.

Parameters
lhsThe number that contributes the magnitude of the result
rhsThe number that contributes the sign of the result
Returns
The absolute value of lhs with the sign from rhs applied to it.
Implements Opcode:
Flavor:Static BI ← cpysgn BI BI

◆ CopySign() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::CopySign ( const FBigInteger rhs) const
Flavor:Instance

Takes the magnitude of this value and writes the sign from rhs to it.

Parameters
rhsThe number that contributes the sign of the result
Returns
The absolute value of this number with the sign from rhs applied to it.
Implements Opcode:
Flavor:Instance BI ← cpysgn BI BI

◆ CopySignIn()

DBN_FORCEINLINE void FBigInteger::CopySignIn ( const FBigInteger rhs)
Flavor:Mutating

Applies the sign from rhs to this. If this is zero, this will not be affected.

Parameters
rhsThe number to apply the sign from
Implements Opcode:
Flavor:Mutating 0 ← cpysgn BI BI

◆ CountPrecisionBits() [1/2]

DBN_FORCEINLINE int32 FBigInteger::CountPrecisionBits ( ) const
Flavor:Instance

Gets the count of precision bits used in the number

Returns
The count of precision bits on the number
Note
This is defined as GetLength() * 32 - Nlz() - Ntz()
Implements Opcode:
Flavor:Instance I4 ← clamp BI

◆ CountPrecisionBits() [2/2]

DBN_FORCEINLINE int32 FBigInteger::CountPrecisionBits ( const FBigInteger value)
staticFlavor:Static

Gets the count of precision bits used in value

Parameters
valueThe number for which to get the bit count
Returns
The count of precision bits on the number
Note
This is defined as GetLength() * 32 - Nlz() - Ntz()
Implements Opcode:
Flavor:Static I4 ← prec BI

◆ Decrement() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Decrement ( ) const
Flavor:Instance

Copies this and decrements the copy before returning it

Returns
The decremented value
Implements Opcode:
Flavor:Instance BI ← decpre BI

◆ Decrement() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Decrement ( const FBigInteger value)
staticFlavor:Static

Copies value and decrements the copy before returning it

Parameters
valueThe value to decrement
Returns
The decremented value
Implements Opcode:
Flavor:Static BI ← decpre BI

◆ DecrementIn()

void FBigInteger::DecrementIn ( )
Flavor:Mutating

Decrements this

Implements Opcode:
Flavor:Mutating 0 ← decpre BI

◆ Divide() [1/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Divide ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Divides lhs by rhs and returns the quotient as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Static BI ← div BI BI

◆ Divide() [2/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Divide ( const FBigInteger lhs,
uint32  rhs 
)
staticFlavor:Static

Divides lhs by rhs and returns the quotient as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Static BI ← div BI U4

◆ Divide() [3/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Divide ( const FBigInteger lhs,
uint64  rhs 
)
staticFlavor:Static

Divides lhs by rhs and returns the quotient as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Static BI ← div BI U8

◆ Divide() [4/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Divide ( const FBigInteger rhs) const
Flavor:Instance

Divides this number by rhs and returns the quotient as the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Instance BI ← div BI BI

◆ Divide() [5/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Divide ( uint32  rhs) const
Flavor:Instance

Divides this number by rhs and returns the quotient as the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Instance BI ← div BI U4

◆ Divide() [6/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Divide ( uint64  rhs) const
Flavor:Instance

Divides this number by rhs and returns the quotient as the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Instance BI ← div BI U8

◆ DivRem() [1/6]

DBN_FORCEINLINE FBigInteger FBigInteger::DivRem ( const FBigInteger divisor,
FBigInteger quotient 
) const
Flavor:Instance

Divides this number by the given divisor and returns the remainder as the result, also outputting the quotient.

Parameters
divisorThe value for the divisor for this operation
quotientOn return, contains the signed quotient of the division
Returns
The signed remainder of the division
Implements Opcode:
Flavor:Instance BI ← divrem BI BI BI&

◆ DivRem() [2/6]

DBN_FORCEINLINE FBigInteger FBigInteger::DivRem ( const FBigInteger lhs,
const FBigInteger rhs,
FBigInteger quotient 
)
staticFlavor:Static

Divides lhs by rhs and outputs the quotient and the remainder

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
quotientValue reference that will receive the signed quotient of the division
Returns
The signed remainder of the division
Implements Opcode:
Flavor:Static BI ← divrem BI BI BI&

◆ DivRem() [3/6]

DBN_FORCEINLINE uint32 FBigInteger::DivRem ( const FBigInteger lhs,
uint32  rhs,
FBigInteger quotient 
)
staticFlavor:Static

Divides lhs by rhs and outputs the quotient and the remainder

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
quotientValue reference that will receive the signed quotient of the division
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Static U4 ← divrem BI U4 BI&

◆ DivRem() [4/6]

DBN_FORCEINLINE uint64 FBigInteger::DivRem ( const FBigInteger lhs,
uint64  rhs,
FBigInteger quotient 
)
staticFlavor:Static

Divides lhs by rhs and outputs the quotient and the remainder

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
quotientValue reference that will receive the signed quotient of the division
Returns
The modulus remainder of the division
Implements Opcode:
Flavor:Static U8 ← divrem BI U8 BI&
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends

◆ DivRem() [5/6]

uint32 FBigInteger::DivRem ( const uint32  divisor,
FBigInteger quotient 
) const
Flavor:Instance

Divides this number by the given divisor and returns the remainder as the result, also outputting the quotient.

Parameters
divisorThe value for the divisor of this operation
quotientOn return, contains the signed quotient of the division
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Instance U4 ← divrem BI U4 BI&

◆ DivRem() [6/6]

uint64 FBigInteger::DivRem ( const uint64  divisor,
FBigInteger quotient 
) const
Flavor:Instance

Divides this number by the given divisor and returns the remainder as the result, also outputting the quotient.

Parameters
divisorThe value for the divisor of this operation
quotientOn return, contains the signed quotient of the division
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Instance U8 ← divrem BI U8 BI&

◆ DivRemIn()

FBigInteger FBigInteger::DivRemIn ( const FBigInteger divisor)
Flavor:Mutating

Divides this number by the given divisor and returns the quotient as the result, leaving the remainder in this number.

Parameters
divisorThe value for the divisor of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Mutating BI ← divrem BI

◆ FloorLog10() [1/2]

uint32 FBigInteger::FloorLog10 ( ) const
Flavor:Instance

Computes the base 10 logarithm of the given base of the number as a uint32.

Returns
The result of the operation
Note
Even though it is slower, definitely use FloorLog10() for counting number of decimal digits. On optimized builds, the base library behind Log10() and Log10D() has inaccuracies that make it unsuitable for the counting of decimal digits.
Implements Opcode:
Flavor:Instance U4 ← flog10 BI

◆ FloorLog10() [2/2]

DBN_FORCEINLINE uint32 FBigInteger::FloorLog10 ( const FBigInteger value)
staticFlavor:Static

Computes the base 10 logarithm of the given base of the number as a uint32.

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static U4 ← flog10 BI

◆ FloorLog2() [1/2]

uint32 FBigInteger::FloorLog2 ( ) const
Flavor:Instance

Computes the base 2 logarithm of the given base of the number as a uint32.

Returns
The result of the operation
Note
This function is very fast relative to the other Log functions, relying only on the word count of the number and the number of leading zeroes in the topmost word
Implements Opcode:
Flavor:Instance U4 ← flog2 BI

◆ FloorLog2() [2/2]

DBN_FORCEINLINE uint32 FBigInteger::FloorLog2 ( const FBigInteger value)
staticFlavor:Static

Computes the base 2 logarithm of the given base of the number as a uint32.

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Note
This function is very fast relative to the other Log functions, relying only on the word count of the number and the number of leading zeroes in the topmost word
Implements Opcode:
Flavor:Static U4 ← flog2 BI

◆ Gcd() [1/3]

static FBigInteger FBigInteger::Gcd ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Gets the greatest common divisor (GCD) between two numbers.

Parameters
lhsThe left number for which to calculate GCD
rhsThe right number for which to calculate GCD
Returns
The greatest common divisor (GCD) between two numbers.
Implements Opcode:
Flavor:Static BI ← gcd BI BI

◆ Gcd() [2/3]

DBN_FORCEINLINE uint32 FBigInteger::Gcd ( const FBigInteger lhs,
uint32  rhs 
)
staticFlavor:Static

Gets the greatest common divisor (GCD) between two numbers.

Parameters
lhsThe left number for which to calculate GCD
rhsThe right number for which to calculate GCD
Returns
The greatest common divisor (GCD) between two numbers.
Implements Opcode:
Flavor:Static U4 ← gcd BI U4

◆ Gcd() [3/3]

DBN_FORCEINLINE uint64 FBigInteger::Gcd ( const FBigInteger lhs,
uint64  rhs 
)
staticFlavor:Static

Gets the greatest common divisor (GCD) between two numbers.

Parameters
lhsThe left number for which to calculate GCD
rhsThe right number for which to calculate GCD
Returns
The greatest common divisor (GCD) between two numbers.
Implements Opcode:
Flavor:Static U8 ← gcd BI U8

◆ GetBaseTwoComponents() [1/2]

void FBigInteger::GetBaseTwoComponents ( uint32 &  mantissa,
int32 &  exponent 
) const
Flavor:Instance

Computes an IEEE-style base two mantissa and exponent for the number

Parameters
mantissaOn return, contains the mantissa of the number
exponentOn return, contains the exponent of the number
Note
The mantissa and exponent are normalized such that the high bit of the mantissa is always set.
Implements Opcode:
Flavor:Instance 0 ← manexp BI U4& I4&

◆ GetBaseTwoComponents() [2/2]

void FBigInteger::GetBaseTwoComponents ( uint64 &  mantissa,
int32 &  exponent 
) const
Flavor:Instance

Computes an IEEE-style base two mantissa and exponent for the number

Parameters
mantissaOn return, contains the mantissa of the number
exponentOn return, contains the exponent of the number
Note
The mantissa and exponent are normalized such that the high bit of the mantissa is always set.
Implements Opcode:
Flavor:Instance 0 ← manexp BI U8& I4&

◆ GetBit()

DBN_FORCEINLINE int32 FBigInteger::GetBit ( int32  position) const
Flavor:Instance

Extracts the bit at the given bit position

Parameters
positionThe position of the bit to extract
Returns
The requested bit within the number
Implements Opcode:
Flavor:Instance I4 ← bit BI i4

◆ GetLength()

DBN_FORCEINLINE int32 FBigInteger::GetLength ( ) const
Flavor:Instance

Gets the length of the number in 32-bit unsigned words, not accounting for sign

Returns
The length of the number in 32-bit unsigned words, not accounting for sign
Implements Opcode:
Flavor:Instance I4 ← uu4len BI
Note
This is the length of the internal array

◆ GetSign()

DBN_FORCEINLINE int32 FBigInteger::GetSign ( ) const
Flavor:Instance

Gets the sign of the number

Returns
The sign of the number. Will return 1 if number is >= 0, and will return -1 if number is < 0.
Implements Opcode:
Flavor:Instance I4 ← sgn BI

◆ GetSignedBitLength()

int32 FBigInteger::GetSignedBitLength ( ) const
Flavor:Instance

Gets the bit length needed to hold the number in twos complement format.

Returns
the bit length needed to hold the number in twos complement format.
Implements Opcode:
Flavor:Instance I4 ← sblen BI

◆ GetSignedByteLength()

DBN_FORCEINLINE int32 FBigInteger::GetSignedByteLength ( ) const
Flavor:Instance

Gets the byte length needed to hold the number in twos complement format.

Returns
the byte length needed to hold the number in twos complement format.
Implements Opcode:
Flavor:Instance I4 ← su1len BI

◆ GetSignedWordLength()

DBN_FORCEINLINE int32 FBigInteger::GetSignedWordLength ( ) const
Flavor:Instance

Gets the number of 32 bit words needed to hold the number in twos complement format.

Returns
the number of 32 bit words needed to hold the number in twos complement format.
Implements Opcode:
Flavor:Instance I4 ← su4len BI

◆ GetUpperWord()

DBN_FORCEINLINE uint32 FBigInteger::GetUpperWord ( ) const
Flavor:Instance

Gets the uppermost 32-bit word of the number

Returns
The uppermost 32-bit word of the number
Note
Unless the number is zero, the uppermost word will always be non-zero
Implements Opcode:
Flavor:Instance U4 ← topwrd BI

◆ GetWord()

DBN_FORCEINLINE uint32 FBigInteger::GetWord ( int32  index) const
Flavor:Instance

Gets the 32-bit word within the number located at the specified word index

Parameters
indexThe index of the word to retrieve
Returns
the 32-bit word within the number located at the specified word index
Implements Opcode:
Flavor:Instance U4 ← wrd BI I4

◆ Increment() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Increment ( ) const
Flavor:Instance

Copies this and increments the copy before returning it

Returns
The incremented value
Implements Opcode:
Flavor:Instance BI ← incpre BI

◆ Increment() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Increment ( const FBigInteger value)
staticFlavor:Static

Copies value and increments the copy before returning it

Parameters
valueThe value to increment
Returns
The incremented value
Implements Opcode:
Flavor:Static BI ← incpre BI

◆ IncrementIn()

void FBigInteger::IncrementIn ( )
Flavor:Mutating

Increments this

Implements Opcode:
Flavor:Mutating 0 ← incpre BI

◆ Invert() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Invert ( ) const
Flavor:Instance

Returns a bitwise inverted copy of this.

Returns
The result of the inversion. The sign will also be inverted.
Note
This operator, no matter how implemented internally, will present some challenges if used for bitmasking. Specifically, say one is expecting to work with 160-bit masks (5 words). Now say you perform an AND operation on the mask, and now at least the topmost 32 bits are zeroed. FBigInteger will trim itself to 4 words (or less) at that point. Now, if this value is inverted, the FBigInteger doesn't know that it should reconsitute those trimmed bits and invert them. One way to mitigate this is to always have a topmost placeholder bit that is always set.
Implements Opcode:
Flavor:Instance BI ← inv BI

◆ Invert() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Invert ( const FBigInteger value)
staticFlavor:Static

Performs bitwise inversion on value

Parameters
valueThe value to be inverted
Returns
The result of the inversion. The sign will also be inverted.
Note
This operator, no matter how implemented internally, will present some challenges if used for bitmasking. Specifically, say one is expecting to work with 160-bit masks (5 words). Now say you perform an AND operation on the mask, and now at least the topmost 32 bits are zeroed. FBigInteger will trim itself to 4 words (or less) at that point. Now, if this value is inverted, the FBigInteger doesn't know that it should reconsitute those trimmed bits and invert them. One way to mitigate this is to always have a topmost placeholder bit that is always set.
Implements Opcode:
Flavor:Static BI ← inv BI

◆ InvertIn()

void FBigInteger::InvertIn ( )
Flavor:Mutating

Performs bitwise inversion on this BigInteger

Note
This operator, no matter how implemented internally, will present some challenges if used for bitmasking. Specifically, say one is expecting to work with 160-bit masks (5 words). Now say you perform an AND operation on the mask, and now at least the topmost 32 bits are zeroed. FBigInteger will trim itself to 4 words (or less) at that point. Now, if this value is inverted, the FBigInteger doesn't know that it should reconsitute those trimmed bits and invert them. One way to mitigate this is to always have a topmost placeholder bit that is always set.
Implements Opcode:
Flavor:Mutating BI ← inv BI

◆ IsEven()

DBN_FORCEINLINE bool FBigInteger::IsEven ( ) const
Flavor:Instance

Gets whether the number is even.

Returns
True if the value is even, otherwise false
Implements Opcode:
Flavor:Instance B ← iseven BI

◆ IsMinusOne()

DBN_FORCEINLINE bool FBigInteger::IsMinusOne ( ) const
Flavor:Instance

Gets whether the number is equal to negative one.

Returns
True if the value is equal to negative one, otherwise false
Implements Opcode:
Flavor:Instance B ← isneg1 BI

◆ IsNegative()

DBN_FORCEINLINE bool FBigInteger::IsNegative ( ) const
Flavor:Instance

Gets whether the number is negative

Returns
True if the value is negative, otherwise false
Implements Opcode:
Flavor:Instance B ← isneg BI

◆ IsOdd()

DBN_FORCEINLINE bool FBigInteger::IsOdd ( ) const
Flavor:Instance

Gets whether the number is odd.

Returns
True if the value is odd, otherwise false
Implements Opcode:
Flavor:Instance B ← isodd BI

◆ IsOne()

DBN_FORCEINLINE bool FBigInteger::IsOne ( ) const
Flavor:Instance

Gets whether the number is equal to one.

Returns
True if the value is equal to one, otherwise false
Implements Opcode:
Flavor:Instance B ← isone BI

◆ IsPositive()

DBN_FORCEINLINE bool FBigInteger::IsPositive ( ) const
Flavor:Instance

Gets whether the number is positive

Returns
True if the value is positive, otherwise false
Implements Opcode:
Flavor:Instance B ← ispos BI

◆ IsPowerOfTwo()

DBN_FORCEINLINE bool FBigInteger::IsPowerOfTwo ( ) const
Flavor:Instance

Gets whether the number is a power of two

Returns
True if the value is a power of two, otherwise false
Implements Opcode:
Flavor:Instance B ← ispot BI

◆ IsZero()

DBN_FORCEINLINE bool FBigInteger::IsZero ( ) const
Flavor:Instance

Gets whether the number is equal to zero.

Returns
True if the value is equal to zero, otherwise false
Implements Opcode:
Flavor:Instance B ← iszero BI

◆ Log10() [1/2]

DBN_FORCEINLINE float FBigInteger::Log10 ( ) const
Flavor:Instance

Computes the base 10 logarithm of the number as a float

Returns
The result of the operation
Note
Even though it is slower, definitely use FloorLog10() for counting number of decimal digits. On optimized builds, the base library behind Log10() and Log10D() has inaccuracies that make it unsuitable for the counting of decimal digits.
Implements Opcode:
Flavor:Instance F4 ← log10 BI

◆ Log10() [2/2]

DBN_FORCEINLINE float FBigInteger::Log10 ( const FBigInteger value)
staticFlavor:Static

Computes the base 10 logarithm of the number as a float

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static F4 ← log10 BI

◆ Log10D() [1/2]

DBN_FORCEINLINE double FBigInteger::Log10D ( ) const
Flavor:Instance

Computes the base 10 logarithm of the number as a double

Returns
The result of the operation
Note
Even though it is slower, definitely use FloorLog10() for counting number of decimal digits. On optimized builds, the base library behind Log10() and Log10D() has inaccuracies that make it unsuitable for the counting of decimal digits.
Implements Opcode:
Flavor:Instance F8 ← log10d BI

◆ Log10D() [2/2]

DBN_FORCEINLINE double FBigInteger::Log10D ( const FBigInteger value)
staticFlavor:Static

Computes the base 10 logarithm of the number as a double

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static F8 ← log10d BI

◆ Log2() [1/2]

DBN_FORCEINLINE float FBigInteger::Log2 ( ) const
Flavor:Instance

Computes the base 2 logarithm of the number as a float

Returns
The result of the operation
Implements Opcode:
Flavor:Instance F4 ← log2 BI

◆ Log2() [2/2]

DBN_FORCEINLINE float FBigInteger::Log2 ( const FBigInteger value)
staticFlavor:Static

Computes the base 2 logarithm of the number as a float

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static F4 ← log2 BI

◆ Log2D() [1/2]

DBN_FORCEINLINE double FBigInteger::Log2D ( ) const
Flavor:Instance

Computes the base 2 logarithm of the number as a double

Returns
The result of the operation
Implements Opcode:
Flavor:Instance F8 ← log2d BI

◆ Log2D() [2/2]

DBN_FORCEINLINE double FBigInteger::Log2D ( const FBigInteger value)
staticFlavor:Static

Computes the base 2 logarithm of the number as a double

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static F8 ← log2d BI

◆ Loge() [1/2]

DBN_FORCEINLINE float FBigInteger::Loge ( ) const
Flavor:Instance

Computes the base e logarithm of the number as a float

Returns
The result of the operation
Implements Opcode:
Flavor:Instance F4 ← loge BI

◆ Loge() [2/2]

DBN_FORCEINLINE float FBigInteger::Loge ( const FBigInteger value)
staticFlavor:Static

Computes the base e logarithm of the number as a float

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static F4 ← loge BI

◆ LogeD() [1/2]

DBN_FORCEINLINE double FBigInteger::LogeD ( ) const
Flavor:Instance

Computes the base e logarithm of the number as a double

Returns
The result of the operation
Implements Opcode:
Flavor:Instance F8 ← loged BI

◆ LogeD() [2/2]

DBN_FORCEINLINE double FBigInteger::LogeD ( const FBigInteger value)
staticFlavor:Static

Computes the base e logarithm of the number as a double

Parameters
valueThe number to compute the logarithm for
Returns
The result of the operation
Implements Opcode:
Flavor:Static F8 ← loged BI

◆ LogX() [1/4]

double FBigInteger::LogX ( double  base) const
Flavor:Instance

Computes the logarithm of the given base of the number as a double

Parameters
baseThe base of the log to compute
Returns
The result of the logarithm operation
Implements Opcode:
Flavor:Instance F8 ← log BI I4

◆ LogX() [2/4]

DBN_FORCEINLINE double FBigInteger::LogX ( double  base,
const FBigInteger value 
)
staticFlavor:Static

Computes the logarithm of the given base of the number as a double

Parameters
baseThe base of the log to compute
valueThe number to compute the logarithm for
Returns
The result of the logarithm operation
Note
The parameter order is non-standard per this library's standard, for sake of consistency with Unreal API.
Implements Opcode:
Flavor:Static F8 ← log BI F8

◆ LogX() [3/4]

float FBigInteger::LogX ( float  base) const
Flavor:Instance

Computes the logarithm of the given base of the number as a float

Parameters
baseThe base of the log to compute
Returns
The result of the logarithm operation
Implements Opcode:
Flavor:Instance F4 ← log BI I4

◆ LogX() [4/4]

DBN_FORCEINLINE float FBigInteger::LogX ( float  base,
const FBigInteger value 
)
staticFlavor:Static

Computes the logarithm of the given base of the number as a float

Parameters
baseThe base of the log to compute
valueThe number to compute the logarithm for
Returns
The result of the logarithm operation
Note
The parameter order is non-standard per this library's standard, for sake of consistency with Unreal API.
Implements Opcode:
Flavor:Static F4 ← log BI F4

◆ Max()

DBN_FORCEINLINE const FBigInteger & FBigInteger::Max ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Returns the greater of two values

Parameters
lhsThe left-hand number to compare
rhsThe right-hand number to compare
Returns
The greater value
Implements Opcode:
Flavor:Static BI ← max BI BI

◆ MaxIn()

DBN_FORCEINLINE void FBigInteger::MaxIn ( const FBigInteger rhs)
Flavor:Mutating

If rhs is greater than this, the value of this is set to rhs. Otherwise, this is unmodified.

Parameters
rhsThe number to apply if greater than this one
Implements Opcode:
Flavor:Mutating 0 ← max BI BI

◆ MaxMagnitude()

DBN_FORCEINLINE const FBigInteger & FBigInteger::MaxMagnitude ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Returns the value with the greater magnitude, disregarding sign

Parameters
lhsThe left-hand number to compare
rhsThe right-hand number to compare
Returns
The value with the greater magnitude
Implements Opcode:
Flavor:Static BI ← maxmag BI BI

◆ MaxMagnitudeIn()

DBN_FORCEINLINE void FBigInteger::MaxMagnitudeIn ( const FBigInteger rhs)
Flavor:Mutating

If the magnitude of rhs is greater than the magnitude of this, the value of this is set to rhs. Otherwise, this is unmodified.

Parameters
rhsThe number to apply if greater than this one
Implements Opcode:
Flavor:Mutating 0 ← maxmag BI BI

◆ Min()

DBN_FORCEINLINE const FBigInteger & FBigInteger::Min ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Returns the lesser of two values

Parameters
lhsThe left-hand number to compare
rhsThe right-hand number to compare
Returns
The lesser value
Implements Opcode:
Flavor:Static BI ← min BI BI

◆ MinIn()

DBN_FORCEINLINE void FBigInteger::MinIn ( const FBigInteger rhs)
Flavor:Mutating

If rhs is less than this, the value of this is set to rhs. Otherwise, this is unmodified.

Parameters
rhsThe number to apply if less than this one
Implements Opcode:
Flavor:Mutating 0 ← min BI BI

◆ MinMagnitude()

DBN_FORCEINLINE const FBigInteger & FBigInteger::MinMagnitude ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Returns the value with the lesser magnitude, disregarding sign

Parameters
lhsThe left-hand number to compare
rhsThe right-hand number to compare
Returns
The value with the greater magnitude
Implements Opcode:
Flavor:Static BI ← minmag BI BI

◆ MinMagnitudeIn()

DBN_FORCEINLINE void FBigInteger::MinMagnitudeIn ( const FBigInteger rhs)
Flavor:Mutating

If the magnitude of rhs is less than the magnitude of this, the value of this is set to rhs. Otherwise, this is unmodified.

Parameters
rhsThe number to apply if less than this one
Implements Opcode:
Flavor:Mutating 0 ← minmag BI BI

◆ Multiply() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Multiply ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Multiplies the two values and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed product of the product
Implements Opcode:
Flavor:Static BI ← mul BI BI

◆ Multiply() [2/2]

FBigInteger FBigInteger::Multiply ( const FBigInteger rhs) const
Flavor:Instance

Multiplies this number by another number and returns the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed product of the product
Implements Opcode:
Flavor:Instance BI ← mul BI BI

◆ Nabs() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Nabs ( ) const
Flavor:Instance

Computes the negative absolute value of the number

Returns
The negative absolute value of the number
Implements Opcode:
Flavor:Instance BI ← nabs BI

◆ Nabs() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Nabs ( const FBigInteger value)
staticFlavor:Static

Copies value, computes the negative absolute value on the copy, and returns the copy

Parameters
valueThe number for which to compute the negative absolute value
Returns
The negative absolute value of the number
Implements Opcode:
Flavor:Static BI ← nabs BI

◆ NabsIn()

DBN_FORCEINLINE void FBigInteger::NabsIn ( )
Flavor:Mutating

Sets the sign of this number to negative

Implements Opcode:
Flavor:Mutating 0 ← nabs BI

◆ Negate() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Negate ( ) const
Flavor:Instance

Negates the value of the number

Returns
The negated value of the number
Implements Opcode:
Flavor:Instance BI ← neg BI

◆ Negate() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Negate ( const FBigInteger value)
staticFlavor:Static

Copies value, negates the copy, and returns the copy

Parameters
valueThe number to be negated
Returns
The negated value of the number
Implements Opcode:
Flavor:Static BI ← neg BI

◆ NegateIn()

DBN_FORCEINLINE void FBigInteger::NegateIn ( )
Flavor:Mutating

Negates this number

Implements Opcode:
Flavor:Mutating 0 ← neg BI

◆ Nlz() [1/2]

DBN_FORCEINLINE int32 FBigInteger::Nlz ( ) const
Flavor:Instance

Gets the count of leading zero bits on the uppermost 32-bit word of the number

Returns
The count of leading zero bits on the uppermost 32-bit word of the number
Note
This will always be in the range of 0-31, unless the number is zero, for which Nlz() will return 32
Implements Opcode:
Flavor:Instance I4 ← nlz BI

◆ Nlz() [2/2]

DBN_FORCEINLINE int32 FBigInteger::Nlz ( const FBigInteger value)
staticFlavor:Static

Gets the count of leading zero bits on the uppermost 32-bit word of value

Parameters
valueThe number for which to get the bit count
Returns
The count of leading zero bits on the uppermost 32-bit word of the number
Note
This will always be in the range of 0-31, unless the number is zero, for which Nlz() will return 32
Implements Opcode:
Flavor:Static I4 ← nlz BI

◆ Ntz() [1/2]

int32 FBigInteger::Ntz ( ) const
Flavor:Instance

Gets the count of trailing zero bits on the number

Returns
The count of trailing zero bits on the number. Returns zero if the number is zero.
Implements Opcode:
Flavor:Instance I4 ← ntz BI

◆ Ntz() [2/2]

DBN_FORCEINLINE int32 FBigInteger::Ntz ( const FBigInteger value)
staticFlavor:Static

Gets the count of trailing zero bits on value

Parameters
valueThe number for which to get the bit count
Returns
The count of trailing zero bits on the number. Returns zero if the number is zero.
Implements Opcode:
Flavor:Static I4 ← ntz BI

◆ operator bool()

DBN_FORCEINLINE FBigInteger::operator bool ( ) const
explicitFlavor:Operator

Converts the value to a bool

Returns
The converted value
Note
Returns false for Zero and true for all other values.
Implements Opcode:
Flavor:Operator B ← b BI

◆ operator double()

FBigInteger::operator double ( ) const
explicitFlavor:Operator

Converts the value to a double

Returns
The converted value
Note
Overflow is converted to infinity
Implements Opcode:
Flavor:Operator F8 ← f8 BI

◆ operator float()

FBigInteger::operator float ( ) const
explicitFlavor:Operator

Converts the value to a float

Returns
The converted value
Note
Overflow is converted to infinity
Implements Opcode:
Flavor:Operator F4 ← f4 BI

◆ operator int16()

FBigInteger::operator int16 ( ) const
explicitFlavor:Operator

Converts the value to an int16

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator I2 ← i2 BI

◆ operator int32()

FBigInteger::operator int32 ( ) const
explicitFlavor:Operator

Converts the value to an int32

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator I4 ← i4 BI

◆ operator int64()

FBigInteger::operator int64 ( ) const
explicitFlavor:Operator

Converts the value to an int64

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator I8 ← i8 BI

◆ operator int8()

FBigInteger::operator int8 ( ) const
explicitFlavor:Operator

Converts the value to an int8

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator I1 ← i1 BI

◆ operator TArray< uint32 >()

FBigInteger::operator TArray< uint32 > ( ) const
explicitFlavor:Operator

Converts the value to an array of uint32 representing the number in twos complement format.

Returns
The converted value
Implements Opcode:
Flavor:Operator U4[] ← u4arr BI

◆ operator TArray< uint8 >()

FBigInteger::operator TArray< uint8 > ( ) const
explicitFlavor:Operator

Converts the value to an array of uint8 representing the number in twos complement format.

Returns
The converted value
Implements Opcode:
Flavor:Operator U1[] ← u1arr BI

◆ operator uint16()

FBigInteger::operator uint16 ( ) const
explicitFlavor:Operator

Converts the value to a uint16

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator U2 ← u2 BI

◆ operator uint32()

FBigInteger::operator uint32 ( ) const
explicitFlavor:Operator

Converts the value to a uint32

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator U4 ← u4 BI

◆ operator uint64()

FBigInteger::operator uint64 ( ) const
explicitFlavor:Operator

Converts the value to a uint64

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator U8 ← u8 BI

◆ operator uint8()

FBigInteger::operator uint8 ( ) const
explicitFlavor:Operator

Converts the value to a uint8

Returns
The converted value
Note
Overflow is converted to max/min value
Implements Opcode:
Flavor:Operator U1 ← u1 BI

◆ operator!()

DBN_FORCEINLINE bool FBigInteger::operator! ( ) const
Flavor:Operator

Performs boolean inversion on this BigInteger

Returns
The result of the negation
Note
Returns true for Zero, returns false for all other values.
Implements Opcode:
Flavor:Operator B ← not BI

◆ operator%=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator%= ( const FBigInteger rhs)
Flavor:MutatingOperator

Calculates the remainder of dividing this value by a BigInteger

Parameters
rhsThe value for the right hand side of this operation
Returns
The remainder of the division
Implements Opcode:
Flavor:MutatingOperator BI ← rem BI BI

◆ operator&=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator&= ( const FBigInteger rhs)
Flavor:MutatingOperator

Logically ANDs another BigInteger with this one

Parameters
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ANDed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:MutatingOperator BI ← and BI BI

◆ operator*=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator*= ( const FBigInteger rhs)
Flavor:MutatingOperator

Multiplies another BigInteger with this one.

Parameters
rhsThe value for the right hand side of this operation
Returns
The product of the multiplication
Implements Opcode:
Flavor:MutatingOperator BI ← mul BI BI

◆ operator+()

DBN_FORCEINLINE FBigInteger FBigInteger::operator+ ( ) const
Flavor:Operator

Positates this BigInteger

Returns
The result of the positation
Implements Opcode:
Flavor:Operator BI ← pos BI

◆ operator++() [1/2]

DBN_FORCEINLINE FBigInteger & FBigInteger::operator++ ( )
Flavor:Operator

Increments this BigInteger (prefix)

Returns
The value after incrementing
Implements Opcode:
Flavor:Operator BI ← incpre BI

◆ operator++() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::operator++ ( int  )
Flavor:Operator

Increments this BigInteger (postfix)

Returns
The value before incrementing
Implements Opcode:
Flavor:Operator BI ← incpst BI

◆ operator+=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator+= ( const FBigInteger rhs)
Flavor:MutatingOperator

Adds another BigInteger to this one.

Parameters
rhsThe value for the right hand side of this operation
Returns
The sum of the addition
Implements Opcode:
Flavor:MutatingOperator BI ← add BI BI

◆ operator-()

DBN_FORCEINLINE FBigInteger FBigInteger::operator- ( ) const
Flavor:Operator

Negates this BigInteger

Returns
The result of the negation
Implements Opcode:
Flavor:Operator BI ← neg BI

◆ operator--() [1/2]

DBN_FORCEINLINE FBigInteger & FBigInteger::operator-- ( )
Flavor:Operator

Decrements this BigInteger (prefix)

Returns
The value after decrementing
Implements Opcode:
Flavor:Operator BI ← decpre BI

◆ operator--() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::operator-- ( int  )
Flavor:Operator

Decrements this BigInteger (postfix)

Returns
The value before decrementing
Implements Opcode:
Flavor:Operator BI ← decpst BI

◆ operator-=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator-= ( const FBigInteger rhs)
Flavor:MutatingOperator

Subtracts another BigInteger from this one.

Parameters
rhsThe value for the right hand side of this operation
Returns
The difference of the subtraction
Implements Opcode:
Flavor:MutatingOperator BI ← sub BI BI

◆ operator/=() [1/3]

DBN_FORCEINLINE FBigInteger & FBigInteger::operator/= ( const FBigInteger rhs)
Flavor:MutatingOperator

Divides this value by another BigInteger.

Parameters
rhsThe value for the right hand side of this operation
Returns
The quotient of the division
Implements Opcode:
Flavor:MutatingOperator BI ← div BI BI

◆ operator/=() [2/3]

DBN_FORCEINLINE FBigInteger & FBigInteger::operator/= ( const uint32  rhs)
Flavor:MutatingOperator

Divides this value by another number.

Parameters
rhsThe value for the right hand side of this operation
Returns
The quotient of the division
Implements Opcode:
Flavor:MutatingOperator BI ← div BI U4

◆ operator/=() [3/3]

DBN_FORCEINLINE FBigInteger & FBigInteger::operator/= ( const uint64  rhs)
Flavor:MutatingOperator

Divides this value by another number.

Parameters
rhsThe value for the right hand side of this operation
Returns
The quotient of the division
Implements Opcode:
Flavor:MutatingOperator BI ← div BI U8

◆ operator<<=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator<<= ( int32  shift)
Flavor:MutatingOperator

Shifts this value left by the given number of bits

Parameters
shiftThe number of bits by which to shift the value
Returns
The shifted value
Implements Opcode:
Flavor:MutatingOperator BI ← shl BI I4

◆ operator=() [1/11]

DBN_FORCEINLINE void FBigInteger::operator= ( bool  from)
Flavor:MutatingOperator

Assigns from a bool

Parameters
fromThe value to assign from
Note
Returns Zero for false and One for true;
Implements Opcode:
Flavor:MutatingOperator BI ← bi B

◆ operator=() [2/11]

DBN_FORCEINLINE void FBigInteger::operator= ( double  from)
Flavor:MutatingOperator

Assigns from a double

Parameters
fromThe value to assign from
Implements Opcode:
Flavor:MutatingOperator BI ← bi F8

◆ operator=() [3/11]

DBN_FORCEINLINE void FBigInteger::operator= ( float  from)
Flavor:MutatingOperator

Assigns from a float

Parameters
fromThe value to assign from
Implements Opcode:
Flavor:MutatingOperator BI ← bi F4

◆ operator=() [4/11]

DBN_FORCEINLINE void FBigInteger::operator= ( int16  from)
Flavor:MutatingOperator

Assigns from an int16

Parameters
fromThe value to assign from
Note
Returns Zero for false and One for true;
Implements Opcode:
Flavor:MutatingOperator BI ← bi I2

◆ operator=() [5/11]

DBN_FORCEINLINE void FBigInteger::operator= ( int32  from)
Flavor:MutatingOperator

Assigns from a int32

Parameters
fromThe value to assign from
Implements Opcode:
Flavor:MutatingOperator BI ← bi I4

◆ operator=() [6/11]

DBN_FORCEINLINE void FBigInteger::operator= ( int64  from)
Flavor:MutatingOperator

Assigns from a int64

Parameters
fromThe value to assign from
Implements Opcode:
Flavor:MutatingOperator BI ← bi I8

◆ operator=() [7/11]

DBN_FORCEINLINE void FBigInteger::operator= ( int8  from)
Flavor:MutatingOperator

Assigns from an int8

Parameters
fromThe value to assign from
Note
Returns Zero for false and One for true;
Implements Opcode:
Flavor:MutatingOperator BI ← bi I1

◆ operator=() [8/11]

DBN_FORCEINLINE void FBigInteger::operator= ( uint16  from)
Flavor:MutatingOperator

Assigns from a uint16

Parameters
fromThe value to assign from
Note
Returns Zero for false and One for true;
Implements Opcode:
Flavor:MutatingOperator BI ← bi U2

◆ operator=() [9/11]

DBN_FORCEINLINE void FBigInteger::operator= ( uint32  from)
Flavor:MutatingOperator

Assigns from a uint32

Parameters
fromThe value to assign from
Implements Opcode:
Flavor:MutatingOperator BI ← bi U4

◆ operator=() [10/11]

DBN_FORCEINLINE void FBigInteger::operator= ( uint64  from)
Flavor:MutatingOperator

Assigns from a uint64

Parameters
fromThe value to assign from
Implements Opcode:
Flavor:MutatingOperator BI ← bi U8

◆ operator=() [11/11]

DBN_FORCEINLINE void FBigInteger::operator= ( uint8  from)
Flavor:MutatingOperator

Assigns from a uint8

Parameters
fromThe value to assign from
Note
Returns Zero for false and One for true;
Implements Opcode:
Flavor:MutatingOperator BI ← bi U1

◆ operator>>=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator>>= ( int32  shift)
Flavor:MutatingOperator

Shifts this value right by the given number of bits

Parameters
shiftThe number of bits by which to shift the value
Returns
The shifted value
Implements Opcode:
Flavor:MutatingOperator BI ← shr BI I4

◆ operator^=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator^= ( const FBigInteger rhs)
Flavor:MutatingOperator

Logically XORs another BigInteger with this one

Parameters
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically XORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:MutatingOperator BI ← xor BI BI

◆ operator|=()

DBN_FORCEINLINE FBigInteger & FBigInteger::operator|= ( const FBigInteger rhs)
Flavor:MutatingOperator

Logically ORs another BigInteger with this one

Parameters
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:MutatingOperator BI ← or BI BI

◆ operator~()

DBN_FORCEINLINE FBigInteger FBigInteger::operator~ ( ) const
Flavor:Operator

Performs bitwise inversion on this BigInteger

Returns
The result of the inversion. The sign will also be inverted.
Note
This operator, no matter how implemented internally, will present some challenges if used for bitmasking. Specifically, say one is expecting to work with 160-bit masks (5 words). Now say you perform an AND operation on the mask, and now at least the topmost 32 bits are zeroed. FBigInteger will trim itself to 4 words (or less) at that point. Now, if this value is inverted, the FBigInteger doesn't know that it should reconsitute those trimmed bits and invert them. One way to mitigate this is to always have a topmost placeholder bit that is always set.
Implements Opcode:
Flavor:Operator BI ← inv BI

◆ Or() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Or ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Logically ORs lhs and rhs and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Static BI ← or BI BI

◆ Or() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Or ( const FBigInteger rhs) const
Flavor:Instance

Logically ORs this number with rhs and returns the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Instance BI ← or BI BI

◆ OrIn()

void FBigInteger::OrIn ( const FBigInteger rhs)
Flavor:Mutating

Logically ORs another BigInteger with this one, overwriting this instance with the result.

Parameters
rhsThe value for the right hand side of this operation
Note
Sign is treated as another bit logically ORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Mutating 0 ← or BI BI

◆ Pop() [1/2]

int32 FBigInteger::Pop ( ) const
Flavor:Instance

Gets the count of set bits on the number

Returns
The count of set bits on the number.
Implements Opcode:
Flavor:Instance I4 ← pop BI

◆ Pop() [2/2]

DBN_FORCEINLINE int32 FBigInteger::Pop ( const FBigInteger value)
staticFlavor:Static

Gets the count of set bits on value

Parameters
valueThe number for which to get the bit count
Returns
The count of set bits on the number.
Implements Opcode:
Flavor:Static I4 ← pop BI

◆ Pow() [1/5]

DBN_FORCEINLINE FBigInteger FBigInteger::Pow ( const FBigInteger base,
float  exponent 
)
staticFlavor:Static

Computes the result of raising the given base to the given exponent

Parameters
baseThe base number to be raised to a poower
exponentThe power to raise the number to
Returns
The result of the exponentiation operation
Implements Opcode:
Flavor:Static BI ← pow BI F4

◆ Pow() [2/5]

DBN_FORCEINLINE FBigInteger FBigInteger::Pow ( const FBigInteger base,
int32  exponent 
)
staticFlavor:Static

Computes the result of raising the given base to the given exponent

Parameters
baseThe base number to be raised to a poower
exponentThe power to raise the number to
Returns
The result of the exponentiation operation
Implements Opcode:
Flavor:Static BI ← pow BI I4

◆ Pow() [3/5]

FBigInteger FBigInteger::Pow ( float  exponent) const
Flavor:Instance

Computes the result of raising the number to the given exponent

Parameters
exponentThe power to raise the number to
Returns
The result of the exponentiation operation
Note
Pretty sure it's O(n^3 log n) complexity. It's a beast that uses a bunch of Sqrt()ing. Accurate to about 6 digits but precise all the way to the decimal point.
Implements Opcode:
Flavor:Instance BI ← pow BI F4

◆ Pow() [4/5]

DBN_FORCEINLINE FBigInteger FBigInteger::Pow ( int32  base,
int32  exponent 
)
staticFlavor:Static

Computes the result of raising the given base to the given exponent

Parameters
baseThe base number to be raised to a poower
exponentThe power to raise the number to
Returns
The result of the exponentiation operation
Implements Opcode:
Flavor:Static BI ← pow I4 I4

◆ Pow() [5/5]

FBigInteger FBigInteger::Pow ( int32  exponent) const
Flavor:Instance

Computes the result of raising the number to the given exponent

Parameters
exponentThe power to raise the number to
Returns
The result of the exponentiation operation
Note
O(n^2) complexity
Implements Opcode:
Flavor:Instance BI ← pow BI I4

◆ Remainder() [1/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Remainder ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Divides lhs by rhs and returns the remainder as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed remainder of the division
Implements Opcode:
Flavor:Static BI ← rem BI BI

◆ Remainder() [2/6]

DBN_FORCEINLINE uint32 FBigInteger::Remainder ( const FBigInteger lhs,
const uint32  rhs 
)
staticFlavor:Static

Divides lhs by rhs and returns the remainder as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Static U4 ← rem BI U4

◆ Remainder() [3/6]

DBN_FORCEINLINE uint64 FBigInteger::Remainder ( const FBigInteger lhs,
const uint64  rhs 
)
staticFlavor:Static

Divides lhs by rhs and returns the remainder as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Static U8 ← rem BI U8

◆ Remainder() [4/6]

DBN_FORCEINLINE FBigInteger FBigInteger::Remainder ( const FBigInteger rhs) const
Flavor:Instance

Divides this number by rhs and returns the remainder as the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed remainder of the division
Implements Opcode:
Flavor:Instance BI ← rem BI BI

◆ Remainder() [5/6]

DBN_FORCEINLINE uint32 FBigInteger::Remainder ( uint32  rhs) const
Flavor:Instance

Divides this number by rhs and returns the remainder as the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Instance U4 ← rem BI U4

◆ Remainder() [6/6]

DBN_FORCEINLINE uint64 FBigInteger::Remainder ( uint64  rhs) const
Flavor:Instance

Divides this number by rhs and returns the remainder as the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Instance U8 ← rem BI U8

◆ Select()

DBN_FORCEINLINE const FBigInteger & FBigInteger::Select ( const FBigInteger whenTrue,
const FBigInteger whenFalse,
bool  condition 
)
staticFlavor:Static

Returns the whenTrue parameter when condition is true. Otherwise returns whenFalse.

Parameters
whenTrueThe value to return when condition is true
whenFalseThe value to return when condition is false
conditionThe condition that determines which value is returned.
Returns
Returns the whenTrue parameter when condition is true. Otherwise returns whenFalse.
Implements Opcode:
Flavor:Static BI ← sel BI BI B

◆ SelectIn()

DBN_FORCEINLINE void FBigInteger::SelectIn ( const FBigInteger rhs,
bool  condition 
)
Flavor:Mutating

Either keeps the current value of this, or chooses a new value for this based on condition If condition is false, the value of this is set to rhs. Otherwise, this is unmodified.

Parameters
rhsThe number to apply if which is false
conditionIf true, the current value of this is kept. Otherwise the value of this is replaced with the value of rhs.
Implements Opcode:
Flavor:Mutating 0 ← sel BI BI B

◆ SetBit() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::SetBit ( const FBigInteger value,
int32  bitIndex 
)
staticFlavor:Static

Returns a new number copied from value, with the specified bit set

Parameters
valueThe value to copy and modify
bitIndexThe index of the bit to modify
Returns
The new number with the specified bit set
Implements Opcode:
Flavor:Static BI ← setbit BI I4

◆ SetBit() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::SetBit ( int32  bitIndex) const
Flavor:Instance

Returns a new number with the specified bit set

Parameters
bitIndexThe index of the bit to modify
Returns
The new number with the specified bit set
Implements Opcode:
Flavor:Instance BI ← setbit BI I4

◆ SetBitIn()

void FBigInteger::SetBitIn ( int32  bitIndex)
Flavor:Mutating

Sets the specified bit in this number

Parameters
bitIndexThe index of the bit to modify
Implements Opcode:
Flavor:Mutating 0 ← setbit BI I4

◆ SetSign() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::SetSign ( bool  isNegative) const
Flavor:Instance

Copies this number and sets the sign of the copy based the value of isNegative. If the value of the number is zero, this will have no effect.

Parameters
isNegativeTrue if the resulting value should be negative.
Returns
A copy of this number with the sign set according to isNegative.
Implements Opcode:
Flavor:Instance BI ← setsgn BI B

◆ SetSign() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::SetSign ( const FBigInteger value,
bool  isNegative 
)
staticFlavor:Static

Copies value and sets the sign of the copy based the value of isNegative. If the value of the number is zero, this will have no effect.

Parameters
valueThe number to be operated on
isNegativeTrue if the resulting value should be negative.
Returns
A copy of value with the sign set according to isNegative.
Implements Opcode:
Flavor:Static BI ← setsgn BI B

◆ SetSignIn()

DBN_FORCEINLINE void FBigInteger::SetSignIn ( bool  isNegative)
Flavor:Mutating

Sets the sign of this number based the value of isNegative. If the value of the number is zero, this will have no effect.

Parameters
isNegativeTrue if the resulting value should be negative.
Implements Opcode:
Flavor:Mutating 0 ← setsgn BI B

◆ SetValueIn() [1/16]

DBN_FORCEINLINE void FBigInteger::SetValueIn ( bool  value)
Flavor:Mutating

Sets the value of this number to a bool value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi B

◆ SetValueIn() [2/16]

DBN_FORCEINLINE void FBigInteger::SetValueIn ( const FBigInteger value)
Flavor:Mutating

Sets the value of this number to another BigInteger

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi BI

◆ SetValueIn() [3/16]

void FBigInteger::SetValueIn ( const TArray< uint32 > &  magnitude,
bool  isNegative 
)
Flavor:Mutating

Sets the value of this number from the given magnitude and sign

Parameters
magnitudeThe magnitude to which to set the number
isNegativeIf true, the resulting value will be negative. Otherwise the value will be positive.
Implements Opcode:
Flavor:Mutating 0 ← bi U4[] B

◆ SetValueIn() [4/16]

void FBigInteger::SetValueIn ( const TArray< uint32 > &  value)
Flavor:Mutating

Sets the value of this number from an array of bytes

Parameters
valueThe value to set the number to
Note
The value is treated as a twos complement value. If negative, the aboslute value will be stored and the sign set accordingly.
Implements Opcode:
Flavor:Mutating 0 ← bi U4[]

◆ SetValueIn() [5/16]

void FBigInteger::SetValueIn ( const TArray< uint8 > &  magnitude,
bool  isNegative 
)
Flavor:Mutating

Sets the value of this number from the given magnitude and sign

Parameters
magnitudeThe magnitude to which to set the number
isNegativeIf true, the resulting value will be negative. Otherwise the value will be positive.
Implements Opcode:
Flavor:Mutating 0 ← bi U1[] B

◆ SetValueIn() [6/16]

void FBigInteger::SetValueIn ( const TArray< uint8 > &  value)
Flavor:Mutating

Sets the value of this number from an array of bytes

Parameters
valueThe value to set the number to
Note
The value is treated as a twos complement value. If negative, the aboslute value will be stored and the sign set accordingly.
Implements Opcode:
Flavor:Mutating 0 ← bi U1[]

◆ SetValueIn() [7/16]

void FBigInteger::SetValueIn ( double  value)
Flavor:Mutating

Sets the value of this number to a double value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi F8

◆ SetValueIn() [8/16]

void FBigInteger::SetValueIn ( float  value)
Flavor:Mutating

Sets the value of this number to a float value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi F4

◆ SetValueIn() [9/16]

DBN_FORCEINLINE void FBigInteger::SetValueIn ( int16  value)
Flavor:Mutating

Sets the value of this number to an int16 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi I2

◆ SetValueIn() [10/16]

void FBigInteger::SetValueIn ( int32  value)
Flavor:Mutating

Sets the value of this number to an int32 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi I4

◆ SetValueIn() [11/16]

void FBigInteger::SetValueIn ( int64  value)
Flavor:Mutating

Sets the value of this number to an int64 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi I8

◆ SetValueIn() [12/16]

DBN_FORCEINLINE void FBigInteger::SetValueIn ( int8  value)
Flavor:Mutating

Sets the value of this number to an int8 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi I1

◆ SetValueIn() [13/16]

DBN_FORCEINLINE void FBigInteger::SetValueIn ( uint16  value)
Flavor:Mutating

Sets the value of this number to a uint16 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi U2

◆ SetValueIn() [14/16]

void FBigInteger::SetValueIn ( uint32  value)
Flavor:Mutating

Sets the value of this number to a uint32 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi U4

◆ SetValueIn() [15/16]

void FBigInteger::SetValueIn ( uint64  value)
Flavor:Mutating

Sets the value of this number to a uint64 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi U8

◆ SetValueIn() [16/16]

DBN_FORCEINLINE void FBigInteger::SetValueIn ( uint8  value)
Flavor:Mutating

Sets the value of this number to a uint8 value

Parameters
valueThe value to set the number to
Implements Opcode:
Flavor:Mutating 0 ← bi U1

◆ SetWord() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::SetWord ( const FBigInteger value,
int32  index,
uint32  word 
)
staticFlavor:Static

Sets the 32-bit word at the given index to the given word on a copy of value.

Parameters
valueThe value to copy and modify
indexThe index of the word to set
wordthe word to set into the copy of value
Returns
The copied and modified value
Note
this CAN expand the word size of the number.
Implements Opcode:
Flavor:Static BI ← setwrd BI I4 U4

◆ SetWord() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::SetWord ( int32  index,
uint32  word 
) const
Flavor:Instance

Sets the 32-bit word at the given index to the given word on a copy of this number.

Parameters
indexThe index of the word to set
wordthe word to set into the copied value
Returns
The copied and modified value
Implements Opcode:
Flavor:Instance BI ← setwrd BI I4 U4
Note
this CAN expand the word size of the number.

◆ SetWordIn()

void FBigInteger::SetWordIn ( int32  index,
uint32  word 
)
Flavor:Mutating

Sets the 32-bit word at the given index to the given value.

Parameters
indexThe index of the word to set
wordthe word to set into this
Note
this CAN expand the word size of the number.
Implements Opcode:
Flavor:Mutating 0 ← setwrd BI I4 U4

◆ ShiftLeft() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ShiftLeft ( const FBigInteger value,
int32  shift 
)
staticFlavor:Static

Copies value and bitwise shifts the copy left by shift number of bits before returning it.

Parameters
valueThe value to shift
shiftThe number of bits by which to shift the value
Returns
The shifted number
Implements Opcode:
Flavor:Static BI ← shl BI I4

◆ ShiftLeft() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ShiftLeft ( int32  shift) const
Flavor:Instance

Copies this number and bitwise shifts the copy left by shift number of bits before returning it.

Parameters
shiftThe number of bits by which to shift the copied value
Returns
The shifted number
Implements Opcode:
Flavor:Instance BI ← shl BI I4

◆ ShiftLeftIn()

void FBigInteger::ShiftLeftIn ( int32  shift)
Flavor:Mutating

Shifts this value left by shift number of bits.

Parameters
shiftThe number of bits by which to shift the value
Implements Opcode:
Flavor:Mutating 0 ← shl BI I4

◆ ShiftRight() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ShiftRight ( const FBigInteger value,
int32  shift 
)
staticFlavor:Static

Copies value and bitwise shifts the copy right by shift number of bits before returning it.

Parameters
valueThe value to shift
shiftThe number of bits by which to shift the value
Returns
The shifted number
Implements Opcode:
Flavor:Static BI ← shr BI I4

◆ ShiftRight() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ShiftRight ( int32  shift) const
Flavor:Instance

Copies this number and bitwise shifts the copy right by shift number of bits before returning it.

Parameters
shiftThe number of bits by which to shift the copiied value
Returns
The shifted number
Implements Opcode:
Flavor:Instance BI ← shr BI I4

◆ ShiftRightIn()

void FBigInteger::ShiftRightIn ( int32  shift)
Flavor:Mutating

Shifts this value right by shift number of bits.

Parameters
shiftThe number of bits by which to shift the value
Implements Opcode:
Flavor:Mutating 0 ← shr BI I4

◆ Sqrt() [1/2]

FBigInteger FBigInteger::Sqrt ( ) const
Flavor:Instance

Computes the square root of the number

Returns
The square root of the number
Implements Opcode:
Flavor:Instance BI ← sqrt BI

◆ Sqrt() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Sqrt ( const FBigInteger value)
staticFlavor:Static

Computes the square root of the number

Parameters
valueThe number to take the square root of
Returns
The square root of the number
Implements Opcode:
Flavor:Static BI ← sqrt BI

◆ Subtract() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Subtract ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Subtracts rhs from lhs returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed difference of the subtraction
Implements Opcode:
Flavor:Static BI ← sub BI BI

◆ Subtract() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Subtract ( const FBigInteger rhs) const
Flavor:Instance

Subtracts another value from this one and returns the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The signed difference of the subtraction
Implements Opcode:
Flavor:Instance BI ← sub BI BI

◆ SubtractIn()

void FBigInteger::SubtractIn ( const FBigInteger rhs)
Flavor:Mutating

Subtracts another BigInteger from this one, overwriting this instance with the result.

Parameters
rhsThe value for the right hand side of this operation
Implements Opcode:
Flavor:Mutating 0 ← sub BI BI

◆ ToggleBit() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ToggleBit ( const FBigInteger value,
int32  bitIndex 
)
staticFlavor:Static

Returns a new number copied from value, with the specified bit toggled

Parameters
valueThe value to copy and modify
bitIndexThe index of the bit to modify
Returns
The new number with the specified bit toggled
Implements Opcode:
Flavor:Static BI ← togbit BI I4

◆ ToggleBit() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::ToggleBit ( int32  bitIndex) const
Flavor:Instance

Returns a new number with the specified bit toggled

Parameters
bitIndexThe index of the bit to modify
Returns
The new number with the specified bit toggled
Implements Opcode:
Flavor:Instance BI ← togbit BI I4

◆ ToggleBitIn()

void FBigInteger::ToggleBitIn ( int32  bitIndex)
Flavor:Mutating

Toggles the specified bit in this number

Parameters
bitIndexThe index of the bit to modify
Implements Opcode:
Flavor:Mutating 0 ← togbit BI I4

◆ ToHexString()

FString FBigInteger::ToHexString ( ) const
Flavor:Instance

Converts this number to a hexadecimal string, without applying any formatting.

Returns
A hexadecimal string representation of the number, with leading sign if the number is negative
Implements Opcode:
Flavor:Instance S ← strh BI

◆ ToString()

FString FBigInteger::ToString ( ) const
Flavor:Instance

Converts this number to a decimal string, without applying any formatting.

Returns
A decimal string representation of the number, with leading sign if the number is negative
Implements Opcode:
Flavor:Instance S ← strd BI

◆ Xor() [1/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Xor ( const FBigInteger lhs,
const FBigInteger rhs 
)
staticFlavor:Static

Logically XORs lhs and rhs and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically XORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Static BI ← xor BI BI

◆ Xor() [2/2]

DBN_FORCEINLINE FBigInteger FBigInteger::Xor ( const FBigInteger rhs) const
Flavor:Instance

Logically XORs this number with rhs and returns the result

Parameters
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically XORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Instance BI ← xor BI BI

◆ XorIn()

void FBigInteger::XorIn ( const FBigInteger rhs)
Flavor:Mutating

Logically XORs another BigInteger with this one, overwriting this instance with the result.

Parameters
rhsThe value for the right hand side of this operation
Note
Sign is treated as another bit logically XORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Mutating 0 ← xor BI BI

Friends And Related Function Documentation

◆ operator!= [1/9]

bool operator!= ( const FBigInteger lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq BI BI

◆ operator!= [2/9]

bool operator!= ( const FBigInteger lhs,
int32  rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq BI I4

◆ operator!= [3/9]

bool operator!= ( const FBigInteger lhs,
int64  rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq BI I8

◆ operator!= [4/9]

bool operator!= ( const FBigInteger lhs,
uint32  rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq BI U4

◆ operator!= [5/9]

bool operator!= ( const FBigInteger lhs,
uint64  rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq BI U8

◆ operator!= [6/9]

bool operator!= ( int32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq I4 BI

◆ operator!= [7/9]

bool operator!= ( int64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq I8 BI

◆ operator!= [8/9]

bool operator!= ( uint32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq U4 BI

◆ operator!= [9/9]

bool operator!= ( uint64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are not equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are not equal, otherwise false
Implements Opcode:
Flavor:Operator B ← neq U8 BI

◆ operator% [1/3]

FBigInteger operator% ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Divides lhs by rhs and returns the remainder as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed remainder of the division
Implements Opcode:
Flavor:Operator BI ← rem BI BI

◆ operator% [2/3]

uint32 operator% ( FBigInteger  lhs,
const uint32  rhs 
)
friendFlavor:Operator

Divides lhs by rhs and returns the remainder as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Operator BI ← rem BI U4
Todo:
Is there any way to get rid of this quotient allocation

◆ operator% [3/3]

uint64 operator% ( FBigInteger  lhs,
const uint64  rhs 
)
friendFlavor:Operator

Divides lhs by rhs and returns the remainder as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The modulus remainder of the division
Note
Due to inablity to return negative numbers, This function returns modulus remainder, which differs from traditional remainder for negative dividends
Implements Opcode:
Flavor:Operator BI ← rem BI U8
Todo:
Is there any way to get rid of this quotient allocation

◆ operator&

FBigInteger operator& ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Logically ANDs lhs and rhs and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ANDed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Operator BI ← and BI BI

◆ operator*

FBigInteger operator* ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Multiplies the two values and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed product of the product
Implements Opcode:
Flavor:Operator BI ← mul BI BI

◆ operator+

FBigInteger operator+ ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Adds the two values and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed sum of the addition
Implements Opcode:
Flavor:Operator BI ← add BI BI

◆ operator-

FBigInteger operator- ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Subtracts rhs from lhs returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed difference of the subtraction
Implements Opcode:
Flavor:Operator BI ← sub BI BI

◆ operator/ [1/3]

FBigInteger operator/ ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Divides lhs by rhs and returns the quotient as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Operator BI ← div BI BI

◆ operator/ [2/3]

FBigInteger operator/ ( FBigInteger  lhs,
const uint32  rhs 
)
friendFlavor:Operator

Divides lhs by rhs and returns the quotient as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Operator BI ← div BI U4

◆ operator/ [3/3]

FBigInteger operator/ ( FBigInteger  lhs,
const uint64  rhs 
)
friendFlavor:Operator

Divides lhs by rhs and returns the quotient as the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The signed quotient of the division
Implements Opcode:
Flavor:Operator BI ← div BI U8

◆ operator< [1/9]

bool operator< ( const FBigInteger lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt BI BI

◆ operator< [2/9]

bool operator< ( const FBigInteger lhs,
const int32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt BI I4

◆ operator< [3/9]

bool operator< ( const FBigInteger lhs,
const int64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt BI I8

◆ operator< [4/9]

bool operator< ( const FBigInteger lhs,
const uint32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt BI U4

◆ operator< [5/9]

bool operator< ( const FBigInteger lhs,
const uint64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt BI U8

◆ operator< [6/9]

bool operator< ( int32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt I4 BI

◆ operator< [7/9]

bool operator< ( int64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt I8 BI

◆ operator< [8/9]

bool operator< ( uint32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt U4 BI

◆ operator< [9/9]

bool operator< ( uint64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lt U8 BI

◆ operator<<

FBigInteger operator<< ( FBigInteger  lhs,
int32  shift 
)
friendFlavor:Operator

Shifts lhs left by the given number of bits

Parameters
lhsThe value to be shifted
shiftThe number of bits by which to shift the value
Returns
The shifted value
Implements Opcode:
Flavor:Operator BI ← shl BI BI

◆ operator<= [1/9]

bool operator<= ( const FBigInteger lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq BI BI

◆ operator<= [2/9]

bool operator<= ( const FBigInteger lhs,
int32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq BI I4

◆ operator<= [3/9]

bool operator<= ( const FBigInteger lhs,
int64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq BI I8

◆ operator<= [4/9]

bool operator<= ( const FBigInteger lhs,
uint32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq BI U4

◆ operator<= [5/9]

bool operator<= ( const FBigInteger lhs,
uint64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq BI U8

◆ operator<= [6/9]

bool operator<= ( int32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq I4 BI

◆ operator<= [7/9]

bool operator<= ( int64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq I8 BI

◆ operator<= [8/9]

bool operator<= ( uint32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq U4 BI

◆ operator<= [9/9]

bool operator<= ( uint64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is less than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is less than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← lteq U8 BI

◆ operator== [1/9]

bool operator== ( const FBigInteger lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq BI BI

◆ operator== [2/9]

bool operator== ( const FBigInteger lhs,
int32  rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq BI I4

◆ operator== [3/9]

bool operator== ( const FBigInteger lhs,
int64  rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq BI I8

◆ operator== [4/9]

bool operator== ( const FBigInteger lhs,
uint32  rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq BI U4

◆ operator== [5/9]

bool operator== ( const FBigInteger lhs,
uint64  rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq BI U8

◆ operator== [6/9]

bool operator== ( int32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq I4 BI

◆ operator== [7/9]

bool operator== ( int64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq I8 BI

◆ operator== [8/9]

bool operator== ( uint32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq U4 BI

◆ operator== [9/9]

bool operator== ( uint64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if they are equal

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the values are equal, otherwise false
Implements Opcode:
Flavor:Operator B ← eq U8 BI

◆ operator> [1/9]

bool operator> ( const FBigInteger lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt BI BI

◆ operator> [2/9]

bool operator> ( const FBigInteger lhs,
int32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt BI I4

◆ operator> [3/9]

bool operator> ( const FBigInteger lhs,
int64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt BI I8

◆ operator> [4/9]

bool operator> ( const FBigInteger lhs,
uint32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt BI U4

◆ operator> [5/9]

bool operator> ( const FBigInteger lhs,
uint64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt BI U8

◆ operator> [6/9]

bool operator> ( int32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt I4 BI

◆ operator> [7/9]

bool operator> ( int64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt I8 BI

◆ operator> [8/9]

bool operator> ( uint32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt U4 BI

◆ operator> [9/9]

bool operator> ( uint64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gt U8 BI

◆ operator>= [1/9]

bool operator>= ( const FBigInteger lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq BI BI

◆ operator>= [2/9]

bool operator>= ( const FBigInteger lhs,
int32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq BI I4

◆ operator>= [3/9]

bool operator>= ( const FBigInteger lhs,
int64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq BI I8

◆ operator>= [4/9]

bool operator>= ( const FBigInteger lhs,
uint32  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq BI U4

◆ operator>= [5/9]

bool operator>= ( const FBigInteger lhs,
uint64  rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq BI U8

◆ operator>= [6/9]

bool operator>= ( int32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq I4 BI

◆ operator>= [7/9]

bool operator>= ( int64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq I8 BI

◆ operator>= [8/9]

bool operator>= ( uint32  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq U4 BI

◆ operator>= [9/9]

bool operator>= ( uint64  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Compares two values to see if the left value is greater than or equal to the right value

Parameters
lhsThe left hand value to compare
rhsThe right hand value to compare
Returns
True if the left value is greater than or equal to the right value, otherwise false
Implements Opcode:
Flavor:Operator B ← gteq U8 BI

◆ operator>>

FBigInteger operator>> ( FBigInteger  lhs,
int32  shift 
)
friendFlavor:Operator

Shifts lhs right by the given number of bits

Parameters
lhsThe value to be shifted
shiftThe number of bits by which to shift the value
Returns
The shifted value
Implements Opcode:
Flavor:Operator BI ← shr BI BI

◆ operator^

FBigInteger operator^ ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Logically XORs lhs and rhs and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically XORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Operator BI ← xor BI BI

◆ operator|

FBigInteger operator| ( FBigInteger  lhs,
const FBigInteger rhs 
)
friendFlavor:Operator

Logically ORs lhs and rhs and returns the result

Parameters
lhsThe value for the left hand side of this operation
rhsThe value for the right hand side of this operation
Returns
The result of the bit logic
Note
Sign is treated as another bit logically ORed, unless the main result is zero, in which case the sign will be positive.
Implements Opcode:
Flavor:Operator BI ← or BI BI

Member Data Documentation

◆ MinusOne

const FBigInteger FBigInteger::MinusOne
staticFlavor:Static

The value representing minus one

Implements Opcode:
Flavor:Static BI ← neg1 0

◆ One

const FBigInteger FBigInteger::One
staticFlavor:Static

The value representing one

Implements Opcode:
Flavor:Static BI ← one 0

◆ Zero

const FBigInteger FBigInteger::Zero
staticFlavor:Static

The value representing zero

Implements Opcode:
Flavor:Static BI ← zero 0

The documentation for this struct was generated from the following files: