Platforms to show: All Mac Windows Linux Cross-Platform

Back to BigNumberMBS class.

BigNumberMBS.Abs as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries absolute value.
Example
Var o as BigNumberMBS = new BigNumberMBS(-123)
Var z as BigNumberMBS = o.Abs

MsgBox z.StringValue

Removes sign.

See also:

BigNumberMBS.Add(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
Adds a number.
Example
Var x as new BigNumberMBS(2)
Var d as new BigNumberMBS(3)
Var p as BigNumberMBS = x.Add(d)

MsgBox p.StringValue // shows 5

BigNumberMBS.BitAnd(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 bitwise AND operation.
Example
Var x as new BigNumberMBS(17)
Var y as new BigNumberMBS(16)
Var r as BigNumberMBS = x.BitAnd(y)

MsgBox r.StringValue

BigNumberMBS.BitOr(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 bitwise or operation.
Example
Var x as new BigNumberMBS(17)
Var y as new BigNumberMBS(16)
Var r as BigNumberMBS = x.BitOr(y)

MsgBox r.StringValue

BigNumberMBS.BitXOr(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 bitwise xor operation.
Example
Var x as new BigNumberMBS(17)
Var y as new BigNumberMBS(16)
Var r as BigNumberMBS = x.BitXOr(y)

MsgBox r.StringValue

BigNumberMBS.Divide(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
Divides the number.
Example
Var x as new BigNumberMBS(8)
Var d as new BigNumberMBS(2)
Var p as BigNumberMBS = x.Divide(d)

MsgBox p.StringValue // shows 4

BigNumberMBS.Equals(other as BigNumberMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks if two numbers are the same.
Example
Var o as BigNumberMBS = new BigNumberMBS(123)
Var z as BigNumberMBS = new BigNumberMBS(123)

if o.Equals(z) then
MsgBox "equal"
else
Break // error
end if

Returns true if equal.

BigNumberMBS.Floor as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes any fraction part.
Example
Var o as BigNumberMBS = new BigNumberMBS(2.3)
Var s as BigNumberMBS = o.Floor

MsgBox s.StringValue

Var a as BigNumberMBS = new BigNumberMBS(-2.3)
Var b as BigNumberMBS = a.Floor

MsgBox b.StringValue

BigNumberMBS.Frac as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Extracts the fraction part.
Example
Var o as BigNumberMBS = new BigNumberMBS(2.5)
Var s as BigNumberMBS = o.Frac

MsgBox s.StringValue

Var a as BigNumberMBS = new BigNumberMBS(-2.5)
Var b as BigNumberMBS = a.Frac

MsgBox b.StringValue

BigNumberMBS.GetStringValue(Base as Integer = 10, scientific as boolean = false, scientificFrom as Integer = 15, round as Integer = -1, TrimZeros as Boolean = true, comma as String = ".") as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries string value.
Example
Var o as new BigNumberMBS(1234)

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

// show as number with comma and 3 digits
Var z as new BigNumberMBS(12.345)
MsgBox z.GetStringValue(10, false, 15, 3, true, ",")

Base: The base of the number system. Normally 10, but also 16 for hex is common.
scientific: Whether to use scientific notation.
scientificFrom: How many digits we show.
Round: Whether to round to n digits.
TrimZeros: Whether to trim unneeded zeros.
comma: The character to use as decimal dot.

See also:

BigNumberMBS.GetStringValue(Conversion as BigNumberConversionMBS) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries string value.
Example
Var o As New BigNumberMBS(1234567.890)

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

Var s1 As String = o.GetStringValue(conv)
// 1'234'567,89

conv.Comma = "."
conv.Group = ","

Var s2 As String = o.GetStringValue(conv)
// 1,234,567,89

conv.Comma = ","
conv.Group = "'"
conv.Scientific = True

Var s3 As String = o.GetStringValue(conv)
// 1,235e+6

Break

See also:

BigNumberMBS.Modulate(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
Modulates a number.
Example
Var x as new BigNumberMBS(17)
Var y as new BigNumberMBS(3)
Var r as BigNumberMBS = x.Modulate(y)

MsgBox r.StringValue

Similar to mod keyword in Xojo.

BigNumberMBS.Modulate2 as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Modulates by 2.
Example
Var x as new BigNumberMBS(8)
Var y as new BigNumberMBS(9)

MsgBox str(x.Modulate2)+" "+str(y.Modulate2)

Returns 0 or 1.

BigNumberMBS.Multiply(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
Multiplies two numbers.
Example
Var x as new BigNumberMBS(8)
Var d as new BigNumberMBS(2)
Var p as BigNumberMBS = x.Multiply(d)

MsgBox p.StringValue // shows 16

See also:

BigNumberMBS.Multiply(value as Integer) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiply by an integer.
Example
Var x as new BigNumberMBS(2)
Var p as BigNumberMBS = x.Multiply(3)

MsgBox p.StringValue // shows 6

See also:

BigNumberMBS.Multiply(value as UInt32) as BigNumberMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiply by an unsigned integer.
Example
Var x as new BigNumberMBS(17)
Var r as BigNumberMBS = x.Multiply(3)

MsgBox r.StringValue

See also:

BigNumberMBS.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 the number.
Example
Var o as BigNumberMBS = new BigNumberMBS(123)
Var z as BigNumberMBS = o.Negate

MsgBox z.StringValue

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

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


The biggest plugin in space...