Platforms to show: All Mac Windows Linux Cross-Platform

BigNumberMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Math MBS DataTypes Plugin 16.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: The class for a big number.
Notes:
This is floating point number with 320 bits, precise for over 100 digits before the dot.
So if you want to store currency or other values where rounding should not happen, better store values multiplied, e.g. in cents.

Compared to normal double values, you have 5 times the bits.
And we check for math errors and raise exceptions if something goes wrong.

See LargeNumberMBS for a 4128 bit integer number, about 1200 digits in length.

For MBS Plugin 21.1 this class is updated to have 1280 bits instead of 320 bits in length. This provides a wider range (256 bit exponent) and a higher precision (1024 bit).

Feedback, Comments & Corrections

  • 12 properties
  • 51 methods
  • 54 shared methods
    • shared method Abs(value as BigNumberMBS) as BigNumberMBS
    • shared method ACos(value as BigNumberMBS) as BigNumberMBS
    • shared method ACosh(value as BigNumberMBS) as BigNumberMBS
    • shared method ACot(value as BigNumberMBS) as BigNumberMBS
    • shared method ACoth(value as BigNumberMBS) as BigNumberMBS
    • shared method ASin(value as BigNumberMBS) as BigNumberMBS
    • shared method ASinh(value as BigNumberMBS) as BigNumberMBS
    • shared method ATan(value as BigNumberMBS) as BigNumberMBS
    • shared method ATanh(value as BigNumberMBS) as BigNumberMBS
    • shared method Cos(value as BigNumberMBS) as BigNumberMBS
    • shared method Cosh(value as BigNumberMBS) as BigNumberMBS
    • shared method Cot(value as BigNumberMBS) as BigNumberMBS
    • shared method Coth(value as BigNumberMBS) as BigNumberMBS
    • shared method DegToDeg(d as BigNumberMBS, m as BigNumberMBS, s as BigNumberMBS) as BigNumberMBS
    • shared method DegToGrad(d as BigNumberMBS, m as BigNumberMBS, s as BigNumberMBS) as BigNumberMBS
    • shared method DegToGrad(value as BigNumberMBS) as BigNumberMBS
    • shared method DegToRad(d as BigNumberMBS, m as BigNumberMBS, s as BigNumberMBS) as BigNumberMBS
    • shared method DegToRad(value as BigNumberMBS) as BigNumberMBS
    • shared method E as BigNumberMBS
    • shared method Exp(value as BigNumberMBS) as BigNumberMBS
    • shared method GradToDeg(value as BigNumberMBS) as BigNumberMBS
    • shared method GradToRad(value as BigNumberMBS) as BigNumberMBS
    • shared method HalfPi as BigNumberMBS
    • shared method LibTypeStr as String
    • shared method Ln(value as BigNumberMBS) as BigNumberMBS
    • shared method Ln10 as BigNumberMBS
    • shared method Ln2 as BigNumberMBS
    • shared method Log(value as BigNumberMBS, base as BigNumberMBS) as BigNumberMBS
    • shared method Max as BigNumberMBS
    • shared method Min as BigNumberMBS
    • shared method Nan as BigNumberMBS
    • shared method NumberWithCurrency(value as Currency) as BigNumberMBS
    • shared method NumberWithDouble(value as Double) as BigNumberMBS
    • shared method NumberWithInt32(value as Int32) as BigNumberMBS
    • shared method NumberWithInt64(value as Int64) as BigNumberMBS
    • shared method NumberWithInteger(value as Integer) as BigNumberMBS
    • shared method NumberWithSingle(value as single) as BigNumberMBS
    • shared method NumberWithString(value as String) as BigNumberMBS
    • shared method NumberWithUInt32(value as UInt32) as BigNumberMBS
    • shared method NumberWithUInt64(value as UInt64) as BigNumberMBS
    • shared method NumberWithUInteger(value as UInteger) as BigNumberMBS
    • shared method NumberWithVariant(value as Variant) as BigNumberMBS
    • shared method One as BigNumberMBS
    • shared method Pi as BigNumberMBS
    • shared method RadToDeg(value as BigNumberMBS) as BigNumberMBS
    • shared method RadToGrad(value as BigNumberMBS) as BigNumberMBS
    • shared method Root(value as BigNumberMBS, index as BigNumberMBS) as BigNumberMBS
    • shared method Sgn(value as BigNumberMBS) as BigNumberMBS
    • shared method Sin(value as BigNumberMBS) as BigNumberMBS
    • shared method Sinh(value as BigNumberMBS) as BigNumberMBS
    • shared method Tan(value as BigNumberMBS) as BigNumberMBS
    • shared method Tanh(value as BigNumberMBS) as BigNumberMBS
    • shared method TwoPi as BigNumberMBS
    • shared method Zero as BigNumberMBS

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine


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


BigNumberErrorExceptionMBS   -   BlockMBS

The biggest plugin in space...




Links
MBS Xojo Chart Plugins

Start Chat