diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-03-08 14:45:41 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-03-08 14:45:41 +0000 |
commit | 0fbe71007242887668ea577c681de1093e40c26a (patch) | |
tree | 28e04958964fe5c1d121528ca434eb877e98ca78 /doc/sum.txt | |
parent | 78eec9797533faf0971d0ad5a5d522e4cb2f60d3 (diff) | |
download | mpfr-0fbe71007242887668ea577c681de1093e40c26a.tar.gz |
[doc/sum.txt] Added info about an exact zero result and IEEE 754 / 1788.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10208 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'doc/sum.txt')
-rw-r--r-- | doc/sum.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/sum.txt b/doc/sum.txt index 36344fb8e..0b5aef63e 100644 --- a/doc/sum.txt +++ b/doc/sum.txt @@ -109,7 +109,8 @@ i.e. that the output sum is not shared with an input. If n = 0, then the result is +0, whatever the rounding mode. This is equivalent to mpfr_set_ui and mpfr_set_si on the integer 0, and this choice is consistent with IEEE 754-2008's sum reduction operation of -vector length 0. +vector length 0 (this result +0 for n = 0 is the only requirement of +IEEE 754-2008 for the sum reduction operation). Otherwise the result must be the same as the one that would have been obtained with @@ -145,6 +146,16 @@ exceptions, as specified by the rounding rules. See also: https://sympa.inria.fr/sympa/arc/mpfr/2014-03/msg00000.html +Note: The final standard IEEE 1788-2015 specifies in §12.12.12: + + An exact zero shall be returned as +0 in all rounding directions, + except for roundTowardNegative, where −0 shall be returned. + +However, such a choice for MPFR would not have been consistent with +the extension of the usual IEEE 754 and MPFR rules (see above). +Moreover, IEEE 1788-2015 is already incompatible with IEEE 754-2008 +on the case n = 0 and roundTowardNegative. + Preliminaries About the Representation of MPFR Numbers ────────────────────────────────────────────────────── |