Platforms to show: All Mac Windows Linux Cross-Platform

Back to BigNumberMBS class.

Previous items

BigNumberMBS.Operator_ModuloRight(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the modulo of two numbers.

BigNumberMBS.Operator_Multiply(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiply two numbers.
Example
// speed of light in m/s
Dim SpeedOfLight As New BigNumberMBS("299792458")

// seconds per day
Dim SecondsPerDay As New BigNumberMBS(24 * 3600)

Dim DaysPerYear As New BigNumberMBS(365.25)

Dim LightYear As BigNumberMBS = SpeedOfLight * DaysPerYear * SecondsPerDay
MsgBox LightYear.StringValue+" meter per light year"

// 9.460.730.472.580.800 matches number from Wikipedia


Dim AgeOfUniversum As New BigNumberMBS(13810000000)

Dim MaxDistance As BigNumberMBS = LightYear * AgeOfUniversum

MsgBox MaxDistance.GetStringValue(10, False, 100, 3, True)+" meter maximum"

BigNumberMBS.Operator_MultiplyRight(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiply two numbers.

BigNumberMBS.Operator_Negate as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Negates a number.
Example
dim a as new BigNumberMBS(3)

// negate
dim c as BigNumberMBS = -a

MsgBox c.StringValue

BigNumberMBS.Operator_Power(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates power of two numbers.
Example
dim a as new BigNumberMBS(3)
dim b as new BigNumberMBS(4)

// pow
dim c as BigNumberMBS = a ^ b

MsgBox c.StringValue

BigNumberMBS.Operator_PowerRight(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates power of two numbers.

BigNumberMBS.Operator_Subtract(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Subtracts one number from other.
Example
dim a as new BigNumberMBS(3)
dim b as new BigNumberMBS(4)

// subtract
dim c as BigNumberMBS = a - b

MsgBox c.StringValue

BigNumberMBS.Operator_SubtractRight(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Subtracts one number from other.

BigNumberMBS.Pow(other as BigNumberMBS) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the power of the number.
Example
dim x as new BigNumberMBS(2)
dim o as new BigNumberMBS(5)
dim p as BigNumberMBS = x.Pow(o)

MsgBox p.StringValue // shows 32

BigNumberMBS.Round as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Rounds the number.
Example
dim o as BigNumberMBS = new BigNumberMBS(2.3)
dim s as BigNumberMBS = o.Round

MsgBox s.StringValue

dim a as BigNumberMBS = new BigNumberMBS(-2.3)
dim b as BigNumberMBS = a.Round

MsgBox b.StringValue

BigNumberMBS.SetStringValue(Text As String, Base as Integer, byref AfterText as String, Byref ValueRead as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Parses number from string.
Example
// set to 1.2 and show
dim o as new BigNumberMBS

dim after as string
dim ValueRead as Boolean

o.SetStringValue "1.2 hello", 10, after, ValueRead

MsgBox "value: "+o.StringValue+EndOfLine+"after: "+after
Break

Returns also the text after the given text following the number.
Also sets ValueRead if a value was read.

See also:

BigNumberMBS.SetStringValue(Text As String, Conversion as BigNumberConversionMBS)   New in 24.0

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Parses number from string.
Example
Dim o As New BigNumberMBS

Dim conv As New BigNumberConversionMBS
conv.Comma = ","
conv.Group = "'"
conv.Scientific = False
conv.Round = 3

o.SetStringValue("1'234'567,89", conv)

MessageBox o.StringValue

See also:

BigNumberMBS.SetStringValue(Text As String, Conversion as BigNumberConversionMBS, byref AfterText as String, Byref ValueRead as boolean)   New in 24.0

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Parses number from string.
Example
Dim o As New BigNumberMBS

Dim conv As New BigNumberConversionMBS
conv.Comma = ","
conv.Group = "'"
conv.Scientific = False
conv.Round = 3

Dim after As String
Dim read As Boolean

o.SetStringValue("1'234'567,89abc", conv, after, read)
// read will be true and after contains "abc".

Dim value As String = o.StringValue

Dim after2 As String
Dim read2 As Boolean

o.SetStringValue("abc", conv, after2, read2)
// read2 will be false and after2 contains "abc".

Break

Returns the text after the given text following the number in AfterText parameter.
Sets ValueRead if a value was read.

See also:

BigNumberMBS.SkipFraction as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function skips the fraction.
Example
Dim c As New BigNumberMBS(-3.7)
Dim d As BigNumberMBS = c.SkipFraction

MsgBox d // shows -3

Similar to floor, but different for negative ones.

e.g
2.2 => 2
2.7 => 2
-2.2 => 2
-2.7 => 2

BigNumberMBS.Sqrt as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the square root.
Example
dim o as BigNumberMBS = new BigNumberMBS(256)
dim s as BigNumberMBS = o.Sqrt

MsgBox s.StringValue

BigNumberMBS.StringValue(Base as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Get/Set string value with a given base.
Example
dim o as new BigNumberMBS(1234)

// show as hex
MsgBox o.StringValue(16)

(Read and Write computed property)

See also:

BigNumberMBS.Subtract(other as BigNumberMBS, round as boolean = true) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Subtracts a number.
Example
dim x as new BigNumberMBS(2)
dim d as new BigNumberMBS(3)
dim p as BigNumberMBS = x.Subtract(d)

MsgBox p.StringValue // shows -1

Previous items

The items on this page are in the following plugins: MBS DataTypes Plugin.


The biggest plugin in space...