com.accelad.math.doubledouble.NOTICE Maven / Gradle / Ivy
/**
* Immutable, extended-precision floating-point numbers which maintain 106 bits
* (approximately 30 decimal digits) of precision.
*
* A DoubleDouble uses a representation containing two double-precision 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". The basic arithmetic
* operations are implemented using convenient properties of IEEE-754
* floating-point arithmetic.
*
* The range of values which can be represented is the same as in IEEE-754. The
* precision of the representable numbers is twice as great as IEEE-754 double
* precision.
*
* The correctness of the arithmetic algorithms relies on operations being
* performed with standard IEEE-754 double precision and rounding. This is the
* Java standard arithmetic model, but for performance reasons Java
* implementations are not constrained to using this standard by default. Some
* processors (notably the Intel Pentium architecure) perform floating point
* operations in (non-IEEE-754-standard) extended-precision. A JVM
* implementation may choose to use the non-standard extended-precision as its
* default arithmetic mode. To prevent this from happening, this code uses the
* Java strictfp modifier, which forces all operations to take place in
* the standard IEEE-754 rounding model.
*
* The API provides a value-oriented interface. DoubleDouble values are
* immutable; operations on them return new objects carrying the result of the
* operation. This provides a much simpler semantics for writing DoubleDouble
* expressions, and Java memory management is efficient enough that this imposes
* very little performance penalty.
*
* This 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
*
* - Priest, D., Algorithms for Arbitrary Precision Floating Point
* Arithmetic, in P. Kornerup and D. Matula, Eds., Proc. 10th Symposium on
* Computer Arithmetic, IEEE Computer Society Press, Los Alamitos, Calif., 1991.
*
- Yozo Hida, Xiaoye S. Li and David H. Bailey, Quad-Double Arithmetic:
* Algorithms, Implementation, and Application, manuscript, Oct 2000;
* Lawrence Berkeley National Laboratory Report BNL-46996.
*
- David Bailey, High Precision Software Directory;
* http://crd.lbl.gov/~dhbailey/mpdist/index.html
*
*
*
* @author Martin Davis
*
*/