DoubleDouble.java is a Java^{TM} API
which uses the DoubleDouble technique
to provide twice the precision of IEEE754 floating point numbers.
It implements a floatingpoint representation which
maintains 106 bits (approximately 30 decimal digits) of precision.
The range of values which can be represented is the same as in IEEE754. (i.e. ± ~10^{323} to ~10^{308}) The precision of the representable numbers is twice as great as IEEE754 double precision (i.e. approximately 30 digits of precision versus 15 digits) The implementation uses a representation containing two doubleprecision values. A number x is represented as a pair of doubles, x.hi and x.lo, such that the number represented by x is x.hi + x.lo, where x.lo <= 0.5*ulp(x.hi), (*)and ulp(y) means "unit in the last place of y". Arithmetic operations are implemented using convenient properties of IEEE754 floatingpoint arithmetic. The correctness of the arithmetic algorithms relies on operations being performed with standard IEEE754 double precision and rounding. This is the standard floating point behaviour in Java. However, for performance reasons Java implementations are not constrained to use this standard. Some processors (notably the Intel Pentium architecure) perform floating point operations in extended precision (e.g. 80 bits for Intel FP). To ensure that DoubleDouble operations are computed using the correct arithmetic mode, the Java strictfp modifier is used. Use CasesDoubleDouble has been used for:
Examples(The following examples are computed by sample applications provided with the software distribution)
See Also
CreditsThis implementation uses algorithms originally designed variously by Knuth, Kahan, Dekker, and Linnainmaa. Douglas Priest developed the first C implementation of these techniques. Other more recent C++ implementation are due to Keith M. Briggs and David Bailey et al.References

Java^{TM} is a trademark of Sun Microsystems, Inc. in the United States and other countries.