BigNumberclass | bignum.h[37], reflect.t[407] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
The maximum precision for a BigNumber is about 64,000 digits, and the exponent can range from -32768 to +32767. Since this is a decimal exponent, this implies an absolute value range from 1.0e-32768 to 1.0e+32767. The more digits of precision stored in a given BigNumber value, the more memory the object consumes, and the more time it takes to perform calculations using the value.
Modified in reflect.t[407]:
If desired, modify the BigNumber intrinsic class to provide a to-symbol mapping. We only include this modification if the program is compiled with REFLECT_BIGNUM defined.
intrinsic class
BigNumber : Object
BigNumber
Object
arccosine
arcsine
arctangent
copySignFrom
cosh
cosine
degreesToRadians
divideBy
equalRound
expE
formatString
getAbs
getCeil
getE
getFloor
getFraction
getPi
getPrecision
getScale
getWhole
isNegative
log10
logE
negate
numType
radiansToDegrees
raiseToPower
roundToDecimal
scaleTen
setPrecision
sine
sinh
sqrt
tangent
tanh
valToSymbol
Inherited from Object
:
callInherited
createIterator
createLiveIterator
forEach
getPropList
getPropParams
getSuperclassList
isClass
isTransient
mapAll
ofKind
propDefined
propInherited
propType
arccosine ( ) | bignum.h[182] |
arcsine ( ) | bignum.h[176] |
arctangent ( ) | bignum.h[185] |
copySignFrom (x) | bignum.h[104] |
cosh ( ) | bignum.h[213] |
cosine ( ) | bignum.h[151] |
degreesToRadians ( ) | bignum.h[163] |
divideBy (x) | bignum.h[139] |
Note that the quotient returned will not necessarily have the same value as the whole part of dividing self by x with the '/' operator, because this division handles rounding differently. In particular, the '/' operator will perform the appropriate rounding on the quotient if the quotient has insufficient precision to represent the exact result. This routine, in contrast, does NOT round the quotient, but merely truncates any trailing digits that cannot be represented in the result's precision. The reason for this difference is that it ensures that the relation (dividend=quotient*x+remainder) holds, which would not always be the case if the quotient were rounded up.
Note also that the remainder will not necessarily be less than the divisor. If the quotient cannot be exactly represented (which occurs if the precision of the quotient is smaller than its scale), the remainder will be the correct value so that the relationship above holds, rather than the unique remainder that is smaller than the divisor. In all cases where there is sufficient precision to represent the quotient exactly (to the units digit only, since the quotient returned from this method will always be an integer), the remainder will satisfy the relationship AND will be the unique remainder with absolute value less than the divisor.
equalRound (num) | bignum.h[47] |
expE ( ) | bignum.h[200] |
formatString (maxDigits?, flags?, wholePlaces?, fracDigits?, expDigits?, leadFiller?) | bignum.h[40] |
getAbs ( ) | bignum.h[79] |
getCeil ( ) | bignum.h[82] |
getE (digits) | bignum.h[220] |
getFloor ( ) | bignum.h[85] |
getFraction ( ) | bignum.h[66] |
getPi (digits) | bignum.h[217] |
getPrecision ( ) | bignum.h[53] |
getScale ( ) | bignum.h[88] |
getWhole ( ) | bignum.h[69] |
isNegative ( ) | bignum.h[107] |
log10 ( ) | bignum.h[203] |
logE ( ) | bignum.h[194] |
negate ( ) | bignum.h[98] |
numType ( ) | bignum.h[228] |
radiansToDegrees ( ) | bignum.h[169] |
raiseToPower (x) | bignum.h[209] |
roundToDecimal (places) | bignum.h[76] |
scaleTen (x) | bignum.h[95] |
setPrecision (digits) | bignum.h[63] |
sine ( ) | bignum.h[145] |
sinh ( ) | bignum.h[212] |
sqrt ( ) | bignum.h[188] |
tangent ( ) | bignum.h[157] |
tanh ( ) | bignum.h[214] |
valToSymbol ( ) OVERRIDDEN | reflect.t[408] |