[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Thu Aug 6 22:35:00 UTC 2015
details: /var/hg/gmp/rev/8dd233449633
changeset: 16762:8dd233449633
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Aug 07 00:24:47 2015 +0200
description:
mpn/generic/sqrlo.c: Correct the name of a macro.
details: /var/hg/gmp/rev/7ccc9cc557b8
changeset: 16763:7ccc9cc557b8
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Aug 07 00:25:21 2015 +0200
description:
mpz/sqrtrem.c: Use NEWALLOC.
details: /var/hg/gmp/rev/2190398bf42a
changeset: 16764:2190398bf42a
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Fri Aug 07 00:26:02 2015 +0200
description:
mpz/aorsmul_i.c: Move branches out of main line.
diffstat:
mpn/generic/sqrlo.c | 2 +-
mpz/aorsmul_i.c | 6 ++++--
mpz/sqrtrem.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diffs (61 lines):
diff -r b60eb1552c0a -r 2190398bf42a mpn/generic/sqrlo.c
--- a/mpn/generic/sqrlo.c Fri Aug 07 00:06:49 2015 +0200
+++ b/mpn/generic/sqrlo.c Fri Aug 07 00:26:02 2015 +0200
@@ -234,7 +234,7 @@
{
/* For really large operands, use plain mpn_mul_n but throw away upper n
limbs of result. */
-#if !TUNE_PROGRAM_BUILD && (SQRLO_MUL_N_THRESHOLD > SQR_FFT_THRESHOLD)
+#if !TUNE_PROGRAM_BUILD && (SQRLO_SQR_THRESHOLD > SQR_FFT_THRESHOLD)
mpn_fft_mul (tp, xp, n, xp, n);
#else
mpn_sqr (tp, xp, n);
diff -r b60eb1552c0a -r 2190398bf42a mpz/aorsmul_i.c
--- a/mpz/aorsmul_i.c Fri Aug 07 00:06:49 2015 +0200
+++ b/mpz/aorsmul_i.c Fri Aug 07 00:26:02 2015 +0200
@@ -202,7 +202,7 @@
mpz_addmul_ui (mpz_ptr w, mpz_srcptr x, unsigned long y)
{
#if BITS_PER_ULONG > GMP_NUMB_BITS
- if (UNLIKELY (y > GMP_NUMB_MAX && SIZ(x) != 0))
+ if (UNLIKELY (y > GMP_NUMB_MAX))
{
mpz_t t;
mp_ptr tp;
@@ -210,6 +210,7 @@
TMP_DECL;
TMP_MARK;
xn = SIZ (x);
+ if (xn == 0) return;
MPZ_TMP_INIT (t, ABS (xn) + 1);
tp = PTR (t);
tp[0] = 0;
@@ -230,7 +231,7 @@
mpz_submul_ui (mpz_ptr w, mpz_srcptr x, unsigned long y)
{
#if BITS_PER_ULONG > GMP_NUMB_BITS
- if (y > GMP_NUMB_MAX && SIZ(x) != 0)
+ if (y > GMP_NUMB_MAX)
{
mpz_t t;
mp_ptr tp;
@@ -238,6 +239,7 @@
TMP_DECL;
TMP_MARK;
xn = SIZ (x);
+ if (xn == 0) return;
MPZ_TMP_INIT (t, ABS (xn) + 1);
tp = PTR (t);
tp[0] = 0;
diff -r b60eb1552c0a -r 2190398bf42a mpz/sqrtrem.c
--- a/mpz/sqrtrem.c Fri Aug 07 00:06:49 2015 +0200
+++ b/mpz/sqrtrem.c Fri Aug 07 00:26:02 2015 +0200
@@ -74,7 +74,7 @@
}
else
{
- root_ptr = MPZ_REALLOC (root, root_size);
+ root_ptr = MPZ_NEWALLOC (root, root_size);
rem_size = mpn_sqrtrem (root_ptr, rem_ptr, op_ptr, op_size);
}
More information about the gmp-commit
mailing list