summaryrefslogtreecommitdiff
path: root/mpf
diff options
context:
space:
mode:
authorTorbjorn Granlund <torbjorng@google.com>2015-10-28 22:03:17 +0100
committerTorbjorn Granlund <torbjorng@google.com>2015-10-28 22:03:17 +0100
commit92af88721b44634fd8173c08bf0c9078543da42e (patch)
tree213a0b1d47d28e6dd97c524b169beae636ef0c01 /mpf
parenta47f5429adb4a6240e9dc221f0343b30749bd7c0 (diff)
downloadgmp-92af88721b44634fd8173c08bf0c9078543da42e.tar.gz
Amend last change.
Diffstat (limited to 'mpf')
-rw-r--r--mpf/pow_ui.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mpf/pow_ui.c b/mpf/pow_ui.c
index e5e5ff398..558addc4b 100644
--- a/mpf/pow_ui.c
+++ b/mpf/pow_ui.c
@@ -38,9 +38,12 @@ mpf_pow_ui (mpf_ptr r, mpf_srcptr b, unsigned long int e)
mpf_t t;
int cnt;
- if (e == 0)
+ if (e <= 1)
{
- mpf_set_ui (r, 1);
+ if (e == 0)
+ mpf_set_ui (r, 1);
+ else
+ mpf_set (r, b);
return;
}