diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-05-31 13:50:16 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-05-31 13:50:16 +0000 |
commit | 3fa0625c35b2a656dd2396dda05e62275b989783 (patch) | |
tree | f447d81f0ef3bb0565b5189ef7477d1d8c6669ea /gammaonethird.c | |
parent | 4158b89c74c33bfc2ff2f4e0d9205522e4bf6016 (diff) | |
download | mpfr-3fa0625c35b2a656dd2396dda05e62275b989783.tar.gz |
Merged latest changes from the trunk, more precisely:
* mpfr_custom_get_mantissa was renamed to mpfr_custom_get_significand.
* Functions mpfr_get_si, mpfr_get_ui, mpfr_get_sj, mpfr_get_uj,
mpfr_get_z and mpfr_get_z_2exp no longer have cases with undefined
behavior.
* mpfr.texi: many changes, and the encoding is now UTF-8.
* gammaonethird.c: do ... while(0) style for macros.
* TODO: update.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.0@6894 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'gammaonethird.c')
-rw-r--r-- | gammaonethird.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/gammaonethird.c b/gammaonethird.c index 5f1546f00..fd2f1311d 100644 --- a/gammaonethird.c +++ b/gammaonethird.c @@ -24,20 +24,28 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-impl.h" #define MPFR_ACC_OR_MUL(v) \ - if (v <= ULONG_MAX / acc) \ - acc *= v; \ - else \ + do \ { \ - mpfr_mul_ui (y, y, acc, mode); acc = v; \ - } + if (v <= ULONG_MAX / acc) \ + acc *= v; \ + else \ + { \ + mpfr_mul_ui (y, y, acc, mode); acc = v; \ + } \ + } \ + while (0) #define MPFR_ACC_OR_DIV(v) \ - if (v <= ULONG_MAX / acc) \ - acc *= v; \ - else \ + do \ { \ - mpfr_div_ui (y, y, acc, mode); acc = v; \ - } + if (v <= ULONG_MAX / acc) \ + acc *= v; \ + else \ + { \ + mpfr_div_ui (y, y, acc, mode); acc = v; \ + } \ + } \ + while (0) static void mpfr_mul_ui5 (mpfr_ptr y, mpfr_srcptr x, |