diff options
Diffstat (limited to 'mpf')
-rw-r--r-- | mpf/pow_ui.c | 7 |
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; } |