summaryrefslogtreecommitdiff
path: root/pow_si.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2005-05-04 09:27:48 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2005-05-04 09:27:48 +0000
commit150f2dcebabbb3eb7ef8833751a166e277aa0ebd (patch)
treefb461e4644e7b6c4edb7f0e5bdf9ef884091e0c5 /pow_si.c
parentdf41811f1ecf4f773defab58f3323368528ffa73 (diff)
downloadmpfr-150f2dcebabbb3eb7ef8833751a166e277aa0ebd.tar.gz
improved const_euler and eint
removed dependency from input precision in several functions fixed two bugs in pow (detection of exact cases) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3524 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'pow_si.c')
-rw-r--r--pow_si.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/pow_si.c b/pow_si.c
index 19441adbf..37d580f00 100644
--- a/pow_si.c
+++ b/pow_si.c
@@ -90,18 +90,16 @@ mpfr_pow_si (mpfr_ptr y, mpfr_srcptr x, long int n, mp_rnd_t rnd_mode)
/* Declaration of the intermediary variable */
mpfr_t t;
/* Declaration of the size variable */
- mp_prec_t Nx = MPFR_PREC (x); /* Precision of input variable */
- mp_prec_t Ny = MPFR_PREC (y); /* Precision of output variable */
- mp_prec_t Nt; /* Precision of the intermediary variable */
- mp_exp_t err; /* Precision of error */
+ mp_prec_t Ny = MPFR_PREC (y); /* target precision */
+ mp_prec_t Nt; /* working precision */
+ mp_exp_t err; /* error */
int inexact;
MPFR_SAVE_EXPO_DECL (expo);
MPFR_ZIV_DECL (loop);
/* compute the precision of intermediary variable */
- Nt = MAX (Nx, Ny);
- /* the optimal number of bits : see algorithms.ps */
- Nt = Nt + 3 + MPFR_INT_CEIL_LOG2 (Nt);
+ /* the optimal number of bits : see algorithms.tex */
+ Nt = Ny + 3 + MPFR_INT_CEIL_LOG2 (Ny);
MPFR_SAVE_EXPO_MARK (expo);