summaryrefslogtreecommitdiff
path: root/ui_pow.c
diff options
context:
space:
mode:
authordaney <daney@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 12:30:42 +0000
committerdaney <daney@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 12:30:42 +0000
commit67eadeb93afd45e664156b009ef9a5830a5ccf27 (patch)
tree26090d4e05ab1aaaf5aa79b54f56ced8801ab891 /ui_pow.c
parentf12ff7c4b8879a3f7157f5cf3076121bfc1fef0d (diff)
downloadmpfr-67eadeb93afd45e664156b009ef9a5830a5ccf27.tar.gz
remove limits.h math.h
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1534 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'ui_pow.c')
-rw-r--r--ui_pow.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ui_pow.c b/ui_pow.c
index 7e52bf9c0..1fefbff5f 100644
--- a/ui_pow.c
+++ b/ui_pow.c
@@ -19,9 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#include <stdio.h>
-#include <math.h>
-#include <limits.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -97,7 +94,7 @@ mpfr_ui_pow (y, n, x, rnd_mode)
/* initialise of intermediary variable */
mpfr_init(t);
- mpfr_init2(ti,sizeof(unsigned long int)*CHAR_BIT);
+ mpfr_init2(ti,sizeof(unsigned long int)*8); /* 8 = CHAR_BIT */
mpfr_init(te);
do {
@@ -113,7 +110,7 @@ mpfr_ui_pow (y, n, x, rnd_mode)
mpfr_exp(t,te,GMP_RNDN); /* exp(x*ln(n))*/
/* estimation of the error -- see pow function in algorithms.ps*/
- err = Nt - _mpfr_ceil_log2(1+pow(2,MPFR_EXP(te)+2));
+ err = Nt - (MPFR_EXP(te)+3);
/* actualisation of the precision */
Nt += 10;