BigInteger

BigInteger


Represents an unlimited size signed integer value.


Remarks

The BigInteger can represent a positive or negative value limited in size by only by memory. Negative values are represented in a Twos Complement fashion mimicking the way the hardware and VB uses signed integer values.

The value is represented internally as an array of Integers. This was selected over Bytes because of the speed increase with working with multiple bytes simultaneously. However, Integers are never revealed outside of the class, only byte arrays.

See Also

Project VBCorLib Overview

Implements:

IComparable 

Public:

Properties:

NameDescription
 Precision (get)Returns the number of bytes being used to represent the number. 
 Sign (get)Returns the sign of the number this instance represents. 

Methods:

NameDescription
 AbsoluteReturns the absolute (positive or zero) value of this instance. 
 AddAdds a value to this instance of BigInteger. 
 AndBitsPeforms a bitwise AND of this BigInteger instance and the value passed in. 
 AndNotBitsPeforms a bitwise AND of this BigInteger instance and the NOT value passed in. 
 ClearBitClears the specified bit of the BigInteger instance to 0. 
 CompareToCompares two BigInteger instance to each other returning their relation. 
 DivideDivides this BigInteger instance by the supplied divisor. 
 DivRemDivides this value by the value, returning the quotient and remainding. 
 EqualsDetermines if this BigInteger instance is equal to the other value. 
 FactorialReturns the factorial of this BigInteger value. 
 FlipBitFlips the specified bit, toggling between True and False. 
 GreatestCommonDivisorReturns the greatest common divisor between this instance and the passed in value. 
 MaxReturns the maximum of this instance and a second BigInteger instance. 
 MinReturns the mininum of this instance and a second BigInteger instance. 
 ModulusPerforms a modulus operation, returning the remainder. 
 MultiplyMultiplies this instance of BigInteger by the supplied multiplier. 
 NegateReturns the opposite signed value of this BigInteger instance. 
 NotBitsPeforms a bitwise NOT of this BigInteger instance and the value passed in. 
 OrBitsPerforms a bitwise OR of this BigInteger instance and the value passed in. 
 PowRaises the BigInteger value to the specified power. 
 SetBitSets the specified bit of the BigInteger instance to 1. 
 ShiftLeftPerforms a left shift operation on the BigInteger instance. 
 ShiftRightPerforms a bit shifting operation to the the right. 
 SquareRootReturns the integer square root of a BigInteger. 
 SubtractSubtracts a value to this instance of BigInteger. 
 TestBitTests a specific bit in the number to determine if it is set (1) or not (0). 
 ToArrayReturns a byte array representing the number. 
 ToStringReturns a human readable string of characters representing the number. 
 XorBitsPerforms a bitwise XOR of this BigInteger instance and the value passed in.