This site describes an enhanced BigDecimal class (com.ibm.math.BigDecimal) for Java, which is the basis for a proposed enhancement to java.math.BigDecimal. Please see the Java Specification Request (JSR) for details of the proposal. This JSR was completed in 2004; you can find changes from this design in the Decimal Arithmetic Enhancement Public Review Draft; the revised BigDecimal class and the new MathContext class were shipped in Java 5.
The com.ibm.math.BigDecimal class and its supporting class, MathContext, are fully implemented and are available below in both Java and NetRexx. They are also included with IBM's Java developer kits as of version 1.1.8.
The new class extends the existing class with the floating point arithmetic from ANSI X3.274, which does arithmetic the way people do. This makes it especially easy to add human-oriented arithmetic to your applications.
0.9 0.09 0.009 0.0009 0.00009 0.000009 9E-7 9E-8 9E-9 9E-10
0.9 0.089999996 0.0090 9.0E-4 9.0E-5 9.0E-6 9.0000003E-7 9.0E-8 9.0E-9 8.9999996E-10