The JS 'Decimal' object is patterned after the Java 'BigDecimal' object. Here is an script: a = new Decimal("1.2"); b = new Decimal("1.1"); print(a.subtract(b)); Additionally, there are a number of static methods defined based on IEEE 754r standard and the decNumber package. Here is a script: a = new Decimal("1.2"); b = new Decimal("1.1"); print(Decimal.subtract(a, b)); Any place a decimal value is expected, any primitive or object may be substituted. Doing so will have the effect of constructing a new Decimal with based on the string value of the primitive or object. For example, the following produce the same results as the above: print(Decimal.substract("1.2", "1.1")); print(Decimal.substract(1.2, 1.1)); In the Java BigDecimal package there are parameters defined as "mc". Similarly in the decNumber package, there are parameters defined as "set". In both cases, this is expecting a simple object/hash with a round property. No other properties are supported at this time. Example: print(Decimal.divide(2, 3, {round:Decimal.ROUND_DOWN})) Not all exceptions raised are catchable at this time. What exceptions should be raised and when is open for discussion. References: http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html http://www2.hursley.ibm.com/decimal/dnfloat.html Sources: http://code.intertwingly.net/public/hg/js-decimal/ These Java (and proposed ECMA-262) methods are supported: * abs * add * compareTo * divide * divideToIntegralValue, 2qc * doubleValue * equals * intValue * intValueExact * max * min * movePointLeft * movePointRight * multiply * negate * plus * pow * precision * remainder * round * scale * scaleByPowerOfTen * setScale * signum * stripTrailingZeros * subtract * toEngineeringString * toPlainString * toString * ulp * unscaledValue * valueOf These Java (and proposed ECMA-262) fields are supported: * ONE * ROUND_CEILING * ROUND_DOWN * ROUND_FLOOR * ROUND_HALF_DOWN * ROUND_HALF_EVEN * ROUND_HALF_UP * ROUND_UP * TEN * ZERO These Java methods are not supported: * byteValueExact * divideAndRemainder * floatValue * hashCode * longValue * longValueExact * shortValueExtract * toBigInteger * toBigIntegerExact These Java fields are not supported: * ROUND_UNECESSARY These decNumber (and IEEE 754r) static methods are supported: * abs * add * and (as digitAnd) * canonical * compare * compareSignal * compareTotal * compareTotalMag * copy * copyAbs * copyNegate * copySign * digits * divide * divideInteger * FMA * getExponent * invert (as digitInvert) * isCanonical * isFinite * isInfinite * isInteger * isNaN * isNormal * isSignaling * isSignalling * isSigned * isSubnormal * isZero * logB * max * maxMag * min * minMag * minus * multiply * nextMinus * nextPlus * nextToward * or (as digitOr) * plus * quantize * radix * reduce * remainder * remainderNear * rotate * sameQuantum * scaleB * setExponent * shift * subtract * toEngString * toInt32 * toInt32Exact * toIntegralExact * toIntegralValue * toString * toUInt32 * toUInt32Exact * xor (as digitXor) These decNumber methods are not supported: * class * classString * fromBCD * fromInt32 * fromNumber * fromPacked * fromPackedChecked * fromString * fromUInt32 * fromWide * getCoefficient * setCoefficient * show * toBCD * toNumber * toPacked * toWider * version * zero