summaryrefslogtreecommitdiff
path: root/mpf
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2015-10-13 07:40:08 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2015-10-13 07:40:08 +0200
commit44fe3e7911613d2b22ab5dbff15a2efda2bd2c98 (patch)
treefb3057c00834724c519b364ec1126ce9be69db9c /mpf
parentccb26f66ffdc52ab42588f2966f3ca4654ea0e9c (diff)
downloadgmp-44fe3e7911613d2b22ab5dbff15a2efda2bd2c98.tar.gz
mpf/pow_ui.c: Increased precision of partial results
Diffstat (limited to 'mpf')
-rw-r--r--mpf/pow_ui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpf/pow_ui.c b/mpf/pow_ui.c
index a5af43105..89735f9ab 100644
--- a/mpf/pow_ui.c
+++ b/mpf/pow_ui.c
@@ -1,6 +1,6 @@
/* mpf_pow_ui -- Compute b^e.
-Copyright 1998, 1999, 2001, 2012 Free Software Foundation, Inc.
+Copyright 1998, 1999, 2001, 2012, 2015 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -36,7 +36,7 @@ mpf_pow_ui (mpf_ptr r, mpf_srcptr b, unsigned long int e)
{
mpf_t b2;
- mpf_init2 (b2, mpf_get_prec (r));
+ mpf_init2 (b2, mpf_get_prec (r) + 1);
mpf_set (b2, b);
if ((e & 1) != 0)