diff options
author | tege <tege@gmplib.org> | 1996-06-06 19:48:37 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 1996-06-06 19:48:37 +0200 |
commit | eea0c6eba5d7bdbce755cfec9dc90c7310c5cafe (patch) | |
tree | 73488880589e6c7485520f77f3f89cd789a0de58 /mpz/ui_pow_ui.c | |
parent | bf48ab352658222a2fa4201332dc00e97ba979fa (diff) | |
download | gmp-eea0c6eba5d7bdbce755cfec9dc90c7310c5cafe.tar.gz |
Swap tests for (e == 0) and (blimb == 0).
(This changes the result of 0^0 from 0 to 1.)
Diffstat (limited to 'mpz/ui_pow_ui.c')
-rw-r--r-- | mpz/ui_pow_ui.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mpz/ui_pow_ui.c b/mpz/ui_pow_ui.c index 617d85dfa..19baca14b 100644 --- a/mpz/ui_pow_ui.c +++ b/mpz/ui_pow_ui.c @@ -41,17 +41,17 @@ mpz_ui_pow_ui (r, b, e) /* Single out cases that give result == 0 or 1. These tests are here to simplify the general code below, not to optimize. */ - if (blimb == 0) - { - r->_mp_size = 0; - return; - } if (e == 0) { r->_mp_d[0] = 1; r->_mp_size = 1; return; } + if (blimb == 0) + { + r->_mp_size = 0; + return; + } if (blimb < 0x100) { |