diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-09-14 15:04:09 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-09-14 15:04:09 +0000 |
commit | 7e14505480721339fe95237d5759d93396f25bfb (patch) | |
tree | b8387dfec6d0e522065dff3dead27ca0a98041d2 | |
parent | 0506d11c3a8609b190d5ef859d5e9b46be37d360 (diff) | |
download | mpfr-7e14505480721339fe95237d5759d93396f25bfb.tar.gz |
[src/mpfr-gmp.h] Fixed bug in add_ssaaaa / sub_ddmmss from r13081.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13197 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/mpfr-gmp.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h index 29f5ae0f8..a8a6e17b8 100644 --- a/src/mpfr-gmp.h +++ b/src/mpfr-gmp.h @@ -365,8 +365,8 @@ __MPFR_DECLSPEC void mpfr_tmp_free (struct tmp_marker *); #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ do { \ - unsigned long _a = ((ah) << GMP_NUMB_BITS) + (al); \ - unsigned long _b = ((bh) << GMP_NUMB_BITS) + (bl); \ + unsigned long _a = ((unsigned long) (ah) << GMP_NUMB_BITS) + (al); \ + unsigned long _b = ((unsigned long) (bh) << GMP_NUMB_BITS) + (bl); \ unsigned long _s = _a + _b; \ (sh) = (mp_limb_t) (_s >> GMP_NUMB_BITS); \ (sl) = (mp_limb_t) (_s & MPFR_LIMB_MAX); \ @@ -374,8 +374,8 @@ __MPFR_DECLSPEC void mpfr_tmp_free (struct tmp_marker *); #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ do { \ - unsigned long _a = ((ah) << GMP_NUMB_BITS) + (al); \ - unsigned long _b = ((bh) << GMP_NUMB_BITS) + (bl); \ + unsigned long _a = ((unsigned long) (ah) << GMP_NUMB_BITS) + (al); \ + unsigned long _b = ((unsigned long) (bh) << GMP_NUMB_BITS) + (bl); \ unsigned long _s = _a - _b; \ (sh) = (mp_limb_t) (_s >> GMP_NUMB_BITS); \ (sl) = (mp_limb_t) (_s & MPFR_LIMB_MAX); \ |