Code example for BigDecimal

Methods: doubleValue, movePointLeft

0
		movePtLeft = new BigDecimal(123E18);
		alreadyMoved = movePtLeft.movePointLeft(2);
		assertTrue("move point left 2 failed",
				alreadyMoved.scale() == movePtLeft.scale() + 2
						&& alreadyMoved.doubleValue() == 1.23E18);
		movePtLeft = new BigDecimal(1.123E-12);
		alreadyMoved = movePtLeft.movePointLeft(3);
		assertTrue("move point left 3 failed",
				alreadyMoved.scale() == movePtLeft.scale() + 3
						&& alreadyMoved.doubleValue() == 1.123E-15);
		movePtLeft = new BigDecimal(value, 2);
		alreadyMoved = movePtLeft.movePointLeft(-2);
		assertTrue("move point left -2 failed",
				alreadyMoved.scale() == movePtLeft.scale() - 2
						&& alreadyMoved.toString().equals("12345908"));
	} 
 
	/** 
	 * @tests java.math.BigDecimal#movePointRight(int) 
	 */ 
	public void test_movePointRightI() {