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
Var SpeedOfLight As New BigNumberMBS("299792458")

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

Var DaysPerYear As New BigNumberMBS(365.25)

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

// 9.460.730.472.580.800 matches number from Wikipedia


Var AgeOfUniversum As New BigNumberMBS(13810000000)

Var 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
Var a as new BigNumberMBS(3)

// negate
Var 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
Var a as new BigNumberMBS(3)
Var b as new BigNumberMBS(4)

// pow
Var 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
Var a as new BigNumberMBS(3)
Var b as new BigNumberMBS(4)

// subtract
Var 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
Var x as new BigNumberMBS(2)
Var o as new BigNumberMBS(5)
Var 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
Var o as BigNumberMBS = new BigNumberMBS(2.3)
Var s as BigNumberMBS = o.Round

MsgBox s.StringValue

Var a as BigNumberMBS = new BigNumberMBS(-2.3)
Var 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
Var o as new BigNumberMBS

Var after as string
Var 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)

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
Var o As New BigNumberMBS

Var 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)

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
Var o As New BigNumberMBS

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

Var after As String
Var read As Boolean

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

Var value As String = o.StringValue

Var after2 As String
Var 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
Var c As New BigNumberMBS(-3.7)
Var 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
Var o as BigNumberMBS = new BigNumberMBS(256)
Var 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
Var 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
Var x as new BigNumberMBS(2)
Var d as new BigNumberMBS(3)
Var 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...