Offers a extremely high precision level to make mathematical operations. For integers there is no limits and for floating point numbers, the class allows setting the maximum precision.
BigNumber([number: Object = 0], [precision: Integer = BigNumber.defaultPrecision], [roundType: Integer = BigNumber.defaultRoundType])
Generates a new instance of BigNumber.
number accepts string, number or BigNumber precision precision roundType rounding type
Rounds 5-9 to the nearest even number.
Rounds 0-5 to down.
Rounds 5-9 to up.
Rounds towards to the lower (considerating the signal).
Rounds towards to the higher (considerating the signal).
Rounds towards to the the lower.
Rounds towards to the higher.
Precision that will be used by default.
Default rounding type.
Specifies the max precision (amount of numbers after the floating point).
Indicates the rounding type that will be used when the number is higher than the precision
All the methods (except "set" and "round") that returns BigNumber, will return a new instance instead of the own object used in the calling.
Sets the value of the object with the specified number.
n accepts string, number or a BigNumber
Does the sum.
n accepts string, number or a BigNumber
Does the subtration.
n accepts string, number or a BigNumber
Does the multiplication.
n accepts string, number or a BigNumber
Does the division.
n accepts string, number or a BigNumber
Does the division and returns the remainder.
n accepts string, number or a BigNumber
Does the power.
n accepts string, number or a BigNumber
Compares the numbers and returns -1 if "n" is higher, 0 if they are equal and 1 if "n" is lower.
n accepts string, number or a BigNumber
Returns "-number".
n accepts string, number or a BigNumber
Returns the modulus of the number.
n accepts string, number or a BigNumber
Returs the integer part of the number.
n accepts string, number or a BigNumber
Forces the rounding of the number.
Jonas Raoni Soares Silva
http://jsfromhell.com/classes/bignumber
Created: 2006.05.03 - Modified 2009.07.16