[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sat Feb 2 17:25:21 CET 2013
details: /var/hg/gmp/rev/2b8a4335ef10
changeset: 15374:2b8a4335ef10
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sat Feb 02 17:24:57 2013 +0100
description:
mpz/remove.c: Correct the sign in case of reuse.
details: /var/hg/gmp/rev/de5718acb7de
changeset: 15375:de5718acb7de
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sat Feb 02 17:25:15 2013 +0100
description:
ChangeLog
diffstat:
ChangeLog | 4 ++++
mpz/remove.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 515d809e9fff -r de5718acb7de ChangeLog
--- a/ChangeLog Fri Feb 01 19:12:23 2013 +0100
+++ b/ChangeLog Sat Feb 02 17:25:15 2013 +0100
@@ -1,3 +1,7 @@
+2013-02-02 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * mpz/remove.c: Correct the sign in case of reuse.
+
2013-02-01 Torbjorn Granlund <tege at gmplib.org>
* gmp-impl.h (DIGITS_IN_BASE_PER_LIMB): Add a cast.
diff -r 515d809e9fff -r de5718acb7de mpz/remove.c
--- a/mpz/remove.c Fri Feb 01 19:12:23 2013 +0100
+++ b/mpz/remove.c Sat Feb 02 17:25:15 2013 +0100
@@ -44,7 +44,7 @@
return 0;
}
- if ((fp0 & 1) == 1)
+ if ((fp0 & 1) != 0)
{ /* f is odd */
mp_ptr dp;
mp_size_t dn;
@@ -60,7 +60,7 @@
{ /* mpz_cmpabs_ui (f, 2) == 0 */
pwr = mpz_scan1 (src, 0);
mpz_div_2exp (dest, src, pwr);
- if (pwr & (SIZ (f) < 0)) /*((pwr % 2 == 1) && (SIZ (f) < 0))*/
+ if (pwr & (fn < 0)) /*((pwr % 2 == 1) && (SIZ (f) < 0))*/
mpz_neg (dest, dest);
}
else
More information about the gmp-commit
mailing list