(Inherits from MfObject)
Represents Big Integer object
Fields, Properties, Methods, Remarks, Example
Name |
Description |
|
Initializes a new instance of the MfBigInt class optionally setting the Value property, ReturnAsObject property and the ReadOnly property. |
Name |
Description |
|
Gets the if the class will allow the underlying value to be altered after the constructor has been called. |
||
Gets or sets the if the MfBigInt class will return objects as their return value for various functions. Inherited from MfPrimitive |
||
Gets or sets the value associated with the this instance. |
Name |
Description |
|
Adds value to current instance of MfBigInt. |
||
Performs left shift operation current instance bits by value amount. |
||
Performs right shift operation current instance bits by value amount. |
||
Clones the current instance an return a new instance with the same values. |
||
Compares this instance to a specified MfBigInt instance. Overrides MfObject.CompareTo() |
||
Divides the current instance of MfBigInt by the divisor value and returns remainder as instance of MfBigInt |
||
Calculates the quotient of two MfBigInt signed integers and also returns the remainder in an output parameter. |
||
Gets if this instance Value is the same as the obj instance.Value. Overrides MfObject.Equals() |
||
Gets A hash code for the current MfBigInt instance. Overrides MfObject.GetHashCode() |
||
Gets the Type for the for the Class .Inherited from MfObject. |
||
Get an enumeration value of MfTypeCode the represents MfBigInt Type Code. |
||
Compares the current MfBigInt object to value and returns an indication of their relative values. |
||
Compares the current MfBigInt object to value and returns an indication of their relative values. |
||
Compares the current MfBigInt object to value and returns an indication of their relative values. |
||
Compares the current MfBigInt object to value and returns an indication of their relative values. |
||
Multiplies the current instance of MfBigInt by the value. |
||
Gets if current instance of object is of the same type. Inherited from MfObject. Inherited from MfObject. |
||
Get if the current class is an instance. Inherited from MfObject. |
||
Creates a shallow copy of the current MfObject instance. Inherited from MfObject. |
||
Converts the s representation of a number to its MfBigInt equivalent |
||
Converts the s representation of a number to its MfBigInt equivalent. Uses base value to decode s. |
||
Gets a string representation of the MfBigInt instance. |
||
Gets a string representation of the MfBigInt instance encode by the value of base. |
MfBigInt is capable of working with integer value an any size and is only limited by the resources available on the current computer it is running on. This class can output from base 2 to base 95 by using the ToString(base) method and can read from base 2 to base 95 by using the Parse(s, base) method.
The Value property will always output a base 10 var.
Internally MfBigInt uses an array of integers that grows as needed to store it value. This gives the class the ability to store very large integer value.
Version 0.4
i := new MfBigInt("88839834534058347978797", true) ; create new MfBigInt and set it RetrunAsObject to value to true
iNew := new MfBigInt("5345354")
r := i.Divide(iNew)
MsgBox % MfString.Format("Result:'{0}', Remainder:'{1}'", r.Value, i.Value) ; Result:'16620009551108934', Remainder:'3186161'
i := new MfBigInt(0, true) ; create new MfInt64 and set it RetrunAsObject to value to true
i.Add(2)
iNew := new MfBigInt("5785834585805893405858034584509789576")
MsgBox % i.Add(iNew).Value ; displays 5785834585805893405858034584509789578
MsgBox % i.Add("-053405829305806934085940685").Value ; displays 5785834585805893405858034584509767301
MsgBox % i.Add(258897).Add(new MfInt64(MfInt64.MaxValue)).Value ; displays 5785834585805893405858034584510026198
bigI := MfBigInt.Parse("Kpsio", 88) ; base 88
MsgBox % bigI.Value ; 1234567890