Code example for BigDecimal

Methods: subtract

	public Number addImpl(Number left, Number right) {
		return toBigDecimal(left).add(toBigDecimal(right));
	public Number subtractImpl(Number left, Number right) {
		return toBigDecimal(left).subtract(toBigDecimal(right));
	public Number multiplyImpl(Number left, Number right) {
		return toBigDecimal(left).multiply(toBigDecimal(right));
	public Number divideImpl(Number left, Number right) {
		//Hack until Java 1.5 BigDecimal is available.  For now, pick 
		//a result scale which is the maximum of the scale of the 
		//two operands and an arbitrary maximum (similar to what a 
		//handheld calculator would do).  Then, normalize the result 
		//by removing any trailing zeros. 
		BigDecimal bigLeft = toBigDecimal(left);
		BigDecimal bigRight = toBigDecimal(right);