You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2023/09/05 13:10:20 UTC
[commons-numbers] branch master updated: NUMBERS-202: Add comparison between DD and a quad to the user guide
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git
The following commit(s) were added to refs/heads/master by this push:
new bcee7216 NUMBERS-202: Add comparison between DD and a quad to the user guide
bcee7216 is described below
commit bcee72168f69baf4070cd19ec2eb5c3e8ef357c0
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Sep 5 14:10:04 2023 +0100
NUMBERS-202: Add comparison between DD and a quad to the user guide
---
src/site/apt/userguide/index.apt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/site/apt/userguide/index.apt b/src/site/apt/userguide/index.apt
index 3814faa1..eb0e2f67 100644
--- a/src/site/apt/userguide/index.apt
+++ b/src/site/apt/userguide/index.apt
@@ -794,6 +794,18 @@ z.lo() // = Math.fma(x, y, -x * y)
the round-off component. Splitting and computation of the round-off takes 16 FLOPS which is
far slower than a hardware supported FMA operation.
+** Comparison to IEEE 754 quadruple
+
+ A <<<DD>>> class has a 106-bit significand, 11-bit exponent and a sign bit. It is not an
+ equivalent of the
+ {{{https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format}IEEE 754 quadruple-precision floating-point format}}.
+ This has a 113-bit significand, 15-bit exponent and a sign bit. This has both a larger
+ significand and exponent range, and supports arithmetic to the correctly rounded result.
+ The <<<DD>>> class is a software implementation of an extended precision floating-point number
+ with performance compromises made on the supported finite range and precision of operations.
+ The <<<DD>>> is therefore simpler to consider as a IEEE 754 <<<double>>> with an
+ additional +/- 0.5 ULP used to improve accuracy during compound operations.
+
** Application of DD
<<<DD>>> arithmetic is slower than <<<double>>> arithmetic and faster than <<<BigDecimal>>>.