Enhancements to java.math

Documentation Contents
The following enhancements were made to the java.math package in version 1.3 of the JavaTM 2 SDK.

Performance enhancements in BigIntenger

Class java.math.BigInteger has been reimplemented in pure Java programming-language code. Previously, BigInteger's implementation was based on an underlying C library. On a high-quality VM, the new implementation performs all operations faster than the old implementation. The speed-up can be as much as 5x or more, depending on the operation being performed and the length of the operands.
More robust BigDecimal(String) constructor
The BigDecimal(String) constructor has been enhanced to allow signed strings (for example, "+2.71828") and exponential notation (for example, "1.23E-23") as input.

Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to:

 - all specs in one place