Platforms to show: All Mac Windows Linux Cross-Platform
LargeNumberMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Math | MBS DataTypes Plugin | 19.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
Dim n1 As Int64 = 10000000000
Dim n2 As Int64 = 10000000000
Dim n3 As Int64 = n1 * n2 // overflow, so wrong result
Dim l1 As LargeNumberMBS = LargeNumberMBS.NumberWithInt64(n1)
Dim l2 As LargeNumberMBS = LargeNumberMBS.NumberWithInt64(n2)
Dim l3 As LargeNumberMBS = l1 * l2
Dim s4 As String = l3.StringValue // this is correct
Break
Can be useful to calculate with more than Int64.
This class works with up to 1224 digits.
See BigNumberMBS for a 320 bit floating point number.
- 18 properties
- property BitSize as Integer
- property Bytes as MemoryBlock
- property ByteSize as Integer
- property DoubleValue as Double
- property HexString as String
- property Int64Value as Int64
- property IntegerValue as Integer
- property IsDouble as Boolean
- property IsInt32 as Boolean
- property IsInt64 as Boolean
- property IsNegate as Boolean
- property IsUInt32 as Boolean
- property IsUInt64 as Boolean
- property IsZero as Boolean
- property StringValue as String
- property UInt64Value as UInt64
- property UIntegerValue as UInteger
- property VariantValue as Variant
- 55 methods
- method Add(other as LargeNumberMBS)
- method Add(other as LargeNumberMBS) as LargeNumberMBS
- method AddMod(v as LargeNumberMBS, Modulo as LargeNumberMBS) as LargeNumberMBS
- method CheckBit(bit as integer) as Boolean
- method Clone as LargeNumberMBS
- method Constructor
- method Constructor(other as LargeNumberMBS)
- method Constructor(value as Int32)
- method Constructor(value as Int64)
- method Constructor(value as String)
- method Constructor(value as UInt32)
- method Constructor(value as UInt64)
- method Decrement(value as UInt32 = 1)
- method Divide(other as LargeNumberMBS)
- method Divide(other as LargeNumberMBS) as LargeNumberMBS
- method Divide(value as UInt32) as LargeNumberMBS
- method DivMod(other as LargeNumberMBS, byref DivResult as LargeNumberMBS, byref ModResult as LargeNumberMBS)
- method Equals(other as LargeNumberMBS) as Boolean
- method ExpMod(e as LargeNumberMBS, Modulo as LargeNumberMBS) as LargeNumberMBS
- method FindGCD(v as LargeNumberMBS) as LargeNumberMBS
- method Increment(value as UInt32 = 1)
- method IsPrime(iter as Integer) as Integer
- method LeftShift(bits as integer) as LargeNumberMBS
- method ModInverse(Modulo as LargeNumberMBS) as LargeNumberMBS
- method Modulo(other as LargeNumberMBS)
- method Modulo(other as LargeNumberMBS) as LargeNumberMBS
- method Modulo(value as UInt32) as UInt32
- method MulMod(v as LargeNumberMBS, Modulo as LargeNumberMBS) as LargeNumberMBS
- method Multiply(other as LargeNumberMBS)
- method Multiply(value as UInt32) as LargeNumberMBS
- method Negate as LargeNumberMBS
- method Operator_Add(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_AddRight(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_And(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_Compare(other as LargeNumberMBS) as Integer
- method Operator_Convert as String
- method Operator_Convert(value as String)
- method Operator_Divide(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_DivideRight(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_Modulo(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_ModuloRight(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_Multiply(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_MultiplyRight(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_Negate as LargeNumberMBS
- method Operator_Or(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_Subtract(other as LargeNumberMBS) as LargeNumberMBS
- method Operator_SubtractRight(other as LargeNumberMBS) as LargeNumberMBS
- method RightShift(bits as integer) as LargeNumberMBS
- method SetZero
- method SqrMod(Modulo as LargeNumberMBS) as LargeNumberMBS
- method sqrt as LargeNumberMBS
- method Square as LargeNumberMBS
- method SubMod(v as LargeNumberMBS, Modulo as LargeNumberMBS) as LargeNumberMBS
- method Subtract(other as LargeNumberMBS)
- method Subtract(other as LargeNumberMBS) as LargeNumberMBS
- 17 shared methods
- shared method MaxInt32 as LargeNumberMBS
- shared method MaxInt64 as LargeNumberMBS
- shared method MaxUInt32 as LargeNumberMBS
- shared method MaxUInt64 as LargeNumberMBS
- shared method MinInt32 as LargeNumberMBS
- shared method MinInt64 as LargeNumberMBS
- shared method MinUInt32 as LargeNumberMBS
- shared method MinUInt64 as LargeNumberMBS
- shared method NumberWithInt32(value as Int32) as LargeNumberMBS
- shared method NumberWithInt64(value as Int64) as LargeNumberMBS
- shared method NumberWithInteger(value as Integer) as LargeNumberMBS
- shared method NumberWithString(value as String) as LargeNumberMBS
- shared method NumberWithUInt32(value as UInt32) as LargeNumberMBS
- shared method NumberWithUInt64(value as UInt64) as LargeNumberMBS
- shared method NumberWithUInteger(value as UInteger) as LargeNumberMBS
- shared method NumberWithVariant(value as variant) as LargeNumberMBS
- shared method Prime(byte as Integer) as LargeNumberMBS
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 19.2pr1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1
- MBS Xojo Plugins, version 19.1pr6
- MBS Xojo Plugins, version 19.1pr5
- Large integer numbers in Xojo
Xojo Developer Magazine
- 17.6, page 10: News
- 17.5, page 33: What's New in the MBS Plugins, With the Plugins growing every year, here are new capabilities you may have missed by Stefanie Juchmes
- 17.3, page 61: XDC 2019, Miami Fun and Learning by Marc Zeedar
The items on this page are in the following plugins: MBS DataTypes Plugin.
LargeNumberErrorExceptionMBS - LaunchServicesApplicationListMBS

Links
MBS Xojo Chart Plugins