}
public void testDivide()
{
FixedDecimalNumber fda = new FixedDecimalNumber(".02");
FixedDecimalNumber fdb = new FixedDecimalNumber("2");
fdb = FixedDecimalArithmetic.divide(fda, fdb); // .02/2
assertEquals("0.01", fdb.get());
fdb = new FixedDecimalNumber("-.02");
fdb = FixedDecimalArithmetic.divide(fda, fdb); // .02/.02
assertEquals("-1.00", fdb.get());
fdb =
new FixedDecimalNumber("66", 3);
fdb = FixedDecimalArithmetic.divide(fda, fdb); // .02/.066
assertEquals("0.00", fdb.get());
fda = new FixedDecimalNumber(".005");
fdb = new FixedDecimalNumber(".05");
fdb = FixedDecimalArithmetic.divide(fda, fdb); //.005/.05
assertEquals("0.100", fdb.get());
fdb = new FixedDecimalNumber("50");
fdb = FixedDecimalArithmetic.divide(fda, fdb); // .005/50
assertEquals("0.000", fdb.get());
fda = new FixedDecimalNumber("500");// don't expect decimal point character
fdb = new FixedDecimalNumber("50");
fdb = FixedDecimalArithmetic.divide(fda, fdb); // 500/50
assertEquals("10", fdb.get());
fdb = new FixedDecimalNumber("0.50");
fda = new FixedDecimalNumber("500."); // expect decimal point character
fdb = FixedDecimalArithmetic.divide(fda, fdb); // 500/.50
assertEquals("1000", fdb.get());
}