diff options
author | daney <daney@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-11-16 12:30:42 +0000 |
---|---|---|
committer | daney <daney@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-11-16 12:30:42 +0000 |
commit | 67eadeb93afd45e664156b009ef9a5830a5ccf27 (patch) | |
tree | 26090d4e05ab1aaaf5aa79b54f56ced8801ab891 /ui_pow.c | |
parent | f12ff7c4b8879a3f7157f5cf3076121bfc1fef0d (diff) | |
download | mpfr-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.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; |