This JSR is being submitted by the International Business Machines Corporation (IBM).
IBM Java Technical Strategist
This JSR has been formally endorsed by:
| Company|| Contact|
Amadeus LLC |
9250 NW 36th St.
Miami, FL 33317, USA
(Micro Focus+INTERSOLV) |
The Lawn, Old Bath Road
Newbury RG14 1QN
Minimal Business Objects Lda |
R. Prof. Vitor Fontes 11 B
Carlos Costa e Silva
The Mutual Group |
227 King St. South
Waterloo, ON, N2J 4C5
Technology Solutions Specialist
voice: +1-519-888-3900, x6935
Netscape Communications (AOL) |
501 E. Middlefield Road
Mountain View, CA 94043, USA
Ringlord Technologies |
SHARE Inc. |
401 N Michigan Avenue, Suite 2400
Chicago, IL 60611, USA
Pamela J. Taylor
Deputy Director, Industry Relations
Target Java Platform: All platforms which include the package java.math.
Need that the work addresses: The proposed enhancements to the BigDecimal class primarily add floating point arithmetic to the existing class, allowing the use of decimal numbers for general-purpose arithmetic (especially financial and user-centric applications) without the overheads and potential errors resulting from conversions to and from another type. In addition, safe conversion methods are added to protect programmers from inadvertent data loss.
Why the existing specification does not meet the need: The current BigDecimal class lacks several operations required for common calculations, and the numbers it can manipulate are in practice limited to those which can be represented conveniently as 'plain' numbers, with no exponent. The limitations are severe:
Specification to be developed: We propose addressing the primary requirements by adding support for decimal floating point arithmetic to the BigDecimal class. This can be achieved without altering the existing behavior of the BigDecimal class by simply adding an optional context parameter to the existing operator methods. We also propose adding the missing operator methods, and a small number of improved constructors and conversion methods. The expert group may also wish to consider adding additional mathematical functions, equivalent to those in the class java.lang.Math.
Underlying technologies: It is proposed that the decimal arithmetic algorithms implemented by the augmented class be those defined in the ANSI standard X3.274-1996 (Programming Language REXX, 1996) which provide the necessary function in a form which is compatible with existing BigDecimal numbers.
Proposed package name: It is proposed that the existing java.math package be enhanced.
Possible platform dependencies: None.
Security implications: None. The existing characteristics of the BigDecimal class are preserved.
Internationalization and localization dependencies: It is expected that the expert group will define suitable additions to the java.text.DecimalFormat class to support the enhanced capabilities of the BigDecimal class.
Risk assessment: Apart from the DecimalFormat class just described, the proposed enhancements have no interdependencies with other classes. If the enhancements are not made, the Java platform will continue to be inadequate for commercial, financial, and user-centric data processing. A potential Reference Implementation (RI) and Compatibility Test Suite (CTS) already exist.
Existing specifications that might be deprecated: We propose deprecating the BigDecimal(double) constructor, which currently gives results that are different to the Double.toString() method.
Existing specifications that might need revision: The java.math.BigDecimal class will need revision. The java.text.DecimalFormat class would benefit from revision. A very small java.math.MathContext class is added.
IBM has a complete implementation of the proposed enhancements to the BigDecimal class, along with testcases that test compatibility with both the existing JCK and ANSI X3.274. This implementation could form the basis for the Reference Implementation.
The most recent documentation and binaries (.class files) for the IBM implementation, including background material, may be found at http://speleotrove.com/decimal.
The underlying technology, including algorithms for the arithmetic, is published in: American National Standard for Information Technology -- Programming Language REXX, X3.274-1996, American National Standards Institute, New York, 1996. Additional details and any errata are available at the Rexx Language Association web site.