[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Fri Oct 16 06:04:28 UTC 2015
details: /var/hg/gmp/rev/e9a98d606ef5
changeset: 16878:e9a98d606ef5
user: Hans Wennborg <hwennborg at google.com>
date: Fri Oct 16 07:54:56 2015 +0200
description:
Simplify conditional printing of whitespace.
Clang was warning about passing a non-const format string to printf.
Using the ternary operator seems like a more explicit way of selecting
between printing a space or not.
details: /var/hg/gmp/rev/afa68aec5218
changeset: 16879:afa68aec5218
user: Hans Wennborg <hwennborg at google.com>
date: Fri Oct 16 07:55:40 2015 +0200
description:
Insert parentheses around & expressions within | expressions.
This silences a Clang warning.
details: /var/hg/gmp/rev/65d67387da5b
changeset: 16880:65d67387da5b
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Oct 16 08:03:46 2015 +0200
description:
ChangeLog
diffstat:
ChangeLog | 14 ++++++++++++++
mpn/generic/div_qr_2.c | 2 +-
mpn/generic/toom44_mul.c | 2 +-
mpn/generic/toom53_mul.c | 2 +-
mpn/generic/toom62_mul.c | 2 +-
tests/mpn/t-bdiv.c | 4 ++--
tests/mpn/t-div.c | 4 ++--
7 files changed, 22 insertions(+), 8 deletions(-)
diffs (111 lines):
diff -r d03fda1c1508 -r 65d67387da5b ChangeLog
--- a/ChangeLog Fri Oct 16 02:17:21 2015 +0200
+++ b/ChangeLog Fri Oct 16 08:03:46 2015 +0200
@@ -1,3 +1,17 @@
+2015-10-16 Hans Wennborg <hwennborg at google.com>
+
+ * mpn/generic/div_qr_2.c: Insert parentheses around & expressions.
+ * mpn/generic/toom44_mul.c: Likewise.
+ * mpn/generic/toom53_mul.c: Likewise.
+ * mpn/generic/toom62_mul.c: Likewise.
+ * tests/mpn/t-bdiv.c: Simplify conditional printing of whitespace.
+ * tests/mpn/t-div.c: Likewise.
+
+2015-10-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * configfsf.sub: Updated to version 2015-08-20, from gnulib.
+ * configfsf.guess: Updated to version 2015-09-14, from gnulib.
+
2015-10-14 Torbjörn Granlund <torbjorng at google.com>
* demos/pexpr.c (main): Clear out a variable.
diff -r d03fda1c1508 -r 65d67387da5b mpn/generic/div_qr_2.c
--- a/mpn/generic/div_qr_2.c Fri Oct 16 02:17:21 2015 +0200
+++ b/mpn/generic/div_qr_2.c Fri Oct 16 08:03:46 2015 +0200
@@ -152,7 +152,7 @@
\
sub_ddmmss (r1, r0, n1, n0, _t1, _t0); \
\
- _mask = -(mp_limb_t) (r1 >= _q1 & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >= (q1,q0) */ \
+ _mask = -(mp_limb_t) ((r1 >= _q1) & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >= (q1,q0) */ \
add_ssaaaa (r1, r0, r1, r0, d1 & _mask, d0 & _mask); \
sub_ddmmss (_q3, _q2, _q3, _q2, CNST_LIMB(0), -_mask); \
\
diff -r d03fda1c1508 -r 65d67387da5b mpn/generic/toom44_mul.c
--- a/mpn/generic/toom44_mul.c Fri Oct 16 02:17:21 2015 +0200
+++ b/mpn/generic/toom44_mul.c Fri Oct 16 08:03:46 2015 +0200
@@ -217,7 +217,7 @@
TOOM44_MUL_N_REC (vh, apx, bpx, n + 1, tp); /* vh, 2n+1 limbs */
/* Compute apx = a0 + a1 + a2 + a3 and amx = a0 - a1 + a2 - a3. */
- flags = (enum toom7_flags) (flags | toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp));
+ flags = (enum toom7_flags) (flags | (toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp)));
/* Compute bpx = b0 + b1 + b2 + b3 and bmx = b0 - b1 + b2 - b3. */
flags = (enum toom7_flags) (flags ^ toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp));
diff -r d03fda1c1508 -r 65d67387da5b mpn/generic/toom53_mul.c
--- a/mpn/generic/toom53_mul.c Fri Oct 16 02:17:21 2015 +0200
+++ b/mpn/generic/toom53_mul.c Fri Oct 16 08:03:46 2015 +0200
@@ -111,7 +111,7 @@
flags = (enum toom7_flags) (toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, gp));
/* Compute as2 and asm2. */
- flags = (enum toom7_flags) (flags | toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, gp));
+ flags = (enum toom7_flags) (flags | (toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, gp)));
/* Compute ash = 16 a0 + 8 a1 + 4 a2 + 2 a3 + a4
= 2*(2*(2*(2*a0 + a1) + a2) + a3) + a4 */
diff -r d03fda1c1508 -r 65d67387da5b mpn/generic/toom62_mul.c
--- a/mpn/generic/toom62_mul.c Fri Oct 16 02:17:21 2015 +0200
+++ b/mpn/generic/toom62_mul.c Fri Oct 16 08:03:46 2015 +0200
@@ -111,7 +111,7 @@
aflags = (enum toom7_flags) (toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 5, ap, n, s, gp));
/* Compute as2 and asm2. */
- aflags = (enum toom7_flags) (aflags | toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 5, ap, n, s, gp));
+ aflags = (enum toom7_flags) (aflags | (toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 5, ap, n, s, gp)));
/* Compute ash = 32 a0 + 16 a1 + 8 a2 + 4 a3 + 2 a4 + a5
= 2*(2*(2*(2*(2*a0 + a1) + a2) + a3) + a4) + a5 */
diff -r d03fda1c1508 -r 65d67387da5b tests/mpn/t-bdiv.c
--- a/tests/mpn/t-bdiv.c Fri Oct 16 02:17:21 2015 +0200
+++ b/tests/mpn/t-bdiv.c Fri Oct 16 08:03:46 2015 +0200
@@ -40,7 +40,7 @@
for (i = 3; i >= 0; i--)
{
printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]);
- printf (" " + (i == 0));
+ printf (i == 0 ? "" : " ");
}
}
else
@@ -48,7 +48,7 @@
for (i = n - 1; i >= 0; i--)
{
printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]);
- printf (" " + (i == 0));
+ printf (i == 0 ? "" : " ");
}
}
puts ("");
diff -r d03fda1c1508 -r 65d67387da5b tests/mpn/t-div.c
--- a/tests/mpn/t-div.c Fri Oct 16 02:17:21 2015 +0200
+++ b/tests/mpn/t-div.c Fri Oct 16 08:03:46 2015 +0200
@@ -40,7 +40,7 @@
for (i = 3; i >= 0; i--)
{
printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]);
- printf (" " + (i == 0));
+ printf (i == 0 ? "" : " ");
}
}
else
@@ -48,7 +48,7 @@
for (i = n - 1; i >= 0; i--)
{
printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]);
- printf (" " + (i == 0));
+ printf (i == 0 ? "" : " ");
}
}
puts ("");
More information about the gmp-commit
mailing list