[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Fri Feb 15 11:21:16 CET 2013
details: /var/hg/gmp/rev/cc85fa607226
changeset: 15436:cc85fa607226
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Feb 15 11:21:02 2013 +0100
description:
mpz/fits_s.h: Use NEG_CAST.
details: /var/hg/gmp/rev/70f703591312
changeset: 15437:70f703591312
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Feb 15 11:21:11 2013 +0100
description:
ChangeLog
diffstat:
ChangeLog | 7 ++++++-
mpz/fits_s.h | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r cea984523f93 -r 70f703591312 ChangeLog
--- a/ChangeLog Fri Feb 15 10:42:32 2013 +0100
+++ b/ChangeLog Fri Feb 15 11:21:11 2013 +0100
@@ -1,3 +1,8 @@
+2013-02-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * gmp-impl.h (NEG_CAST, ABS_CAST): Use __GMP_CAST.
+ * mpz/fits_s.h: Use NEG_CAST.
+
2013-02-14 Marc Glisse <marc.glisse at inria.fr>
* gmpxx.h (__gmp_binary_greater): Forward to __gmp_binary_less.
@@ -10,7 +15,7 @@
* mpz/inp_str.c: Likewise.
* mpz/set_str.c: Likewise.
- * gmp-h.in (mpq_cmp_ui): Optimize comparison with 1/1.
+ * gmp-h.in (mpq_cmp_ui): Optimise comparison with 1/1.
* tests/mpq/t-cmp_ui.c: Test special comparisons: 0/1, 1/1.
* mpz/clrbit.c: Reorganise branches.
diff -r cea984523f93 -r 70f703591312 mpz/fits_s.h
--- a/mpz/fits_s.h Fri Feb 15 10:42:32 2013 +0100
+++ b/mpz/fits_s.h Fri Feb 15 11:21:11 2013 +0100
@@ -33,7 +33,7 @@
if (n == 1)
return limb <= MAXIMUM;
if (n == -1)
- return limb <= - (mp_limb_t) MINIMUM;
+ return limb <= NEG_CAST (mp_limb_t, MINIMUM);
#if GMP_NAIL_BITS != 0
{
if ((p[1] >> GMP_NAIL_BITS) == 0)
@@ -42,7 +42,7 @@
if (n == 2)
return limb <= MAXIMUM;
if (n == -2)
- return limb <= - (mp_limb_t) MINIMUM;
+ return limb <= NEG_CAST (mp_limb_t, MINIMUM);
}
}
#endif
More information about the gmp-commit
mailing list