diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-03-14 01:50:48 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-03-14 01:50:48 +0000 |
commit | 5a3c5753cf329ac8381006811ca3ab8b39d816d0 (patch) | |
tree | 8a5f6278a3f767b54baf05ce5ad79a019d25064a | |
parent | 151298e0511b32e4a5893774a202465c4c7ea864 (diff) | |
download | mpfr-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
-rw-r--r-- | BUGS | 2 | ||||
-rw-r--r-- | pow.c | 4 |
2 files changed, 6 insertions, 0 deletions
@@ -57,3 +57,5 @@ Potential bugs: * mpfr_hypot may fail for x very large, y very small and a very large target precision. + +* mpfr_pow fails on (1, 0.5). @@ -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); |