summaryrefslogtreecommitdiff
path: root/src/compound.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-02-05 02:23:45 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-02-05 02:23:45 +0000
commit45af18805cf5b21586c5904b458e8b44be760b89 (patch)
treed297227ac1d99d7e12a3b8435684f9b781e4ec7a /src/compound.c
parent2bc000ffe069214661336b840ba899933cf91ff3 (diff)
downloadmpfr-45af18805cf5b21586c5904b458e8b44be760b89.tar.gz
[src/compound.c] Added a FIXME: possible infinite loop when the result
is exact. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14374 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/compound.c')
-rw-r--r--src/compound.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compound.c b/src/compound.c
index 2fea9a364..4cf6902e0 100644
--- a/src/compound.c
+++ b/src/compound.c
@@ -147,6 +147,8 @@ mpfr_compound (mpfr_ptr y, mpfr_srcptr x, long n, mpfr_rnd_t rnd_mode)
for (nloop = 0; ; nloop++)
{
/* we compute (1+x)^n as 2^(n*log2p1(x)) */
+ /* FIXME: In general, mpfr_log2p1 is inexact while the result is
+ exact, which will yield an infinite loop. */
inexact = mpfr_log2p1 (t, x, MPFR_RNDN) != 0;
e = MPFR_GET_EXP(t);
/* |t - log2(1+x)| <= 1/2*ulp(t) = 2^(e-prec-1) */