diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2013-08-23 02:41:24 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2013-08-23 02:41:24 +0000 |
commit | a80a670c8a7341ea3185f55e0821d9a4ecc7540f (patch) | |
tree | 705f80be581ffd91a7f222eb91d0a9472077a754 /src/agm.c | |
parent | 355cac084eb0ba3c906f76cd0b4d822228b1c270 (diff) | |
download | mpfr-a80a670c8a7341ea3185f55e0821d9a4ecc7540f.tar.gz |
[src/agm.c] Corrected a comment.
[tests/tagm.c] Added tests concerning special values,
in particular (zero,negative) and symmetric tests.
[doc/mpfr.texi] Corrected mpfr_agm description.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8666 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/agm.c')
-rw-r--r-- | src/agm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -72,7 +72,10 @@ mpfr_agm (mpfr_ptr r, mpfr_srcptr op2, mpfr_srcptr op1, mpfr_rnd_t rnd_mode) } } else /* a and b are neither NaN nor Inf, and one is zero */ - { /* If a or b is 0, the result is +0 since a sqrt is positive */ + { /* If a or b is 0, the result is +0, in particular because the + result is always >= 0 with our definition (Maple sometimes + chooses a different sign for GaussAGM, but it uses another + definition, with possible negative results). */ MPFR_ASSERTD (MPFR_IS_ZERO (op1) || MPFR_IS_ZERO (op2)); MPFR_SET_POS (r); MPFR_SET_ZERO (r); |