summaryrefslogtreecommitdiff
path: root/pow.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-03-14 01:50:48 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2003-03-14 01:50:48 +0000
commit5a3c5753cf329ac8381006811ca3ab8b39d816d0 (patch)
tree8a5f6278a3f767b54baf05ce5ad79a019d25064a /pow.c
parent151298e0511b32e4a5893774a202465c4c7ea864 (diff)
downloadmpfr-5a3c5753cf329ac8381006811ca3ab8b39d816d0.tar.gz
This wasn't a compiler bug; mpfr_pow is really buggy.
Added some asserts to show that. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2265 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'pow.c')
-rw-r--r--pow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pow.c b/pow.c
index db9b59595..9a0ae7e4c 100644
--- a/pow.c
+++ b/pow.c
@@ -319,6 +319,10 @@ mpfr_pow (mpfr_ptr z, mpfr_srcptr x, mpfr_srcptr y, mp_rnd_t rnd_mode)
mpfr_mul (te, y, ti, GMP_RNDU); /* y*ln(n) */
mpfr_exp (t, te, GMP_RNDN); /* exp(x*ln(n))*/
+ MPFR_ASSERTN(MPFR_IS_FP(te));
+ MPFR_ASSERTN(MPFR_NOTZERO(te));
+ /* otherwise MPFR_EXP(te) below doesn't exist */
+
/* estimate of the error -- see pow function in algorithms.ps */
err = Nt - (MPFR_EXP(te) + 3);