[Gmp-commit] /var/hg/gmp: 5 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Thu Feb 14 08:46:38 CET 2013
details: /var/hg/gmp/rev/068ab650bbe5
changeset: 15415:068ab650bbe5
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu Feb 14 08:28:55 2013 +0100
description:
Copyright year
details: /var/hg/gmp/rev/d7cca5a0e34d
changeset: 15416:d7cca5a0e34d
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu Feb 14 08:37:12 2013 +0100
description:
mp_dv_tab.c (__gmp_digit_value_tab): Remove a line of unused values.
details: /var/hg/gmp/rev/e9402c5fa63a
changeset: 15417:e9402c5fa63a
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu Feb 14 08:37:25 2013 +0100
description:
ChangeLog
details: /var/hg/gmp/rev/519a4990256c
changeset: 15418:519a4990256c
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu Feb 14 08:46:14 2013 +0100
description:
gmp-h.in (mpq_cmp_ui): Optimize comparison with 1/1.
details: /var/hg/gmp/rev/665b15ea3738
changeset: 15419:665b15ea3738
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu Feb 14 08:46:30 2013 +0100
description:
ChangeLog
diffstat:
ChangeLog | 9 +++++++++
gmp-h.in | 23 ++++++++++++-----------
mp_dv_tab.c | 5 ++---
mpf/set_str.c | 4 ++--
mpn/generic/brootinv.c | 2 +-
mpz/inp_str.c | 6 +++---
mpz/set_str.c | 4 ++--
7 files changed, 31 insertions(+), 22 deletions(-)
diffs (163 lines):
diff -r d5d962ca11c6 -r 665b15ea3738 ChangeLog
--- a/ChangeLog Wed Feb 13 14:00:11 2013 +0100
+++ b/ChangeLog Thu Feb 14 08:46:30 2013 +0100
@@ -1,3 +1,12 @@
+2013-02-14 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * mp_dv_tab.c (__gmp_digit_value_tab): Remove a line of unused values.
+ * mpf/set_str.c: Update offset accordingly.
+ * mpz/inp_str.c: Likewise.
+ * mpz/set_str.c: Likewise.
+
+ * gmp-h.in (mpq_cmp_ui): Optimize comparison with 1/1.
+
2013-02-13 Torbjorn Granlund <tege at gmplib.org>
* acinclude.m4 (GMP_ASM_X86_MULX, GMP_ASM_X86_ADOX): New feature tests.
diff -r d5d962ca11c6 -r 665b15ea3738 gmp-h.in
--- a/gmp-h.in Wed Feb 13 14:00:11 2013 +0100
+++ b/gmp-h.in Thu Feb 14 08:46:30 2013 +0100
@@ -1,7 +1,7 @@
/* Definitions for GNU multiple precision functions. -*- mode: c -*-
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
-2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free
Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -2145,17 +2145,18 @@
#define mpz_cmp_ui(Z,UI) \
(__builtin_constant_p (UI) && (UI) == 0 \
? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI))
-#define mpz_cmp_si(Z,SI) \
- (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \
- : __builtin_constant_p (SI) && (SI) > 0 \
- ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \
+#define mpz_cmp_si(Z,SI) \
+ (__builtin_constant_p ((SI) >= 0) && (SI) >= 0 \
+ ? mpz_cmp_ui (Z, __GMP_CAST (unsigned long, SI)) \
: _mpz_cmp_si (Z,SI))
-#define mpq_cmp_ui(Q,NUI,DUI) \
- (__builtin_constant_p (NUI) && (NUI) == 0 \
- ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI))
-#define mpq_cmp_si(q,n,d) \
- (__builtin_constant_p ((n) >= 0) && (n) >= 0 \
- ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \
+#define mpq_cmp_ui(Q,NUI,DUI) \
+ (__builtin_constant_p (NUI) && (NUI) == 0 ? mpq_sgn (Q) \
+ : __builtin_constant_p ((NUI) == (DUI)) && (NUI) == (DUI) \
+ ? mpz_cmp (mpq_numref (Q), mpq_denref (Q)) \
+ : _mpq_cmp_ui (Q,NUI,DUI))
+#define mpq_cmp_si(q,n,d) \
+ (__builtin_constant_p ((n) >= 0) && (n) >= 0 \
+ ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \
: _mpq_cmp_si (q, n, d))
#else
#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI)
diff -r d5d962ca11c6 -r 665b15ea3738 mp_dv_tab.c
--- a/mp_dv_tab.c Wed Feb 13 14:00:11 2013 +0100
+++ b/mp_dv_tab.c Thu Feb 14 08:46:30 2013 +0100
@@ -3,7 +3,7 @@
THE CONTENTS OF THIS FILE ARE FOR INTERNAL USE AND MAY CHANGE
INCOMPATIBLY OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
-Copyright 2003 Free Software Foundation, Inc.
+Copyright 2003, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -29,7 +29,7 @@
First part of table supports common usages, where 'A' and 'a' have the same
value; this supports bases 2..36
- At offset 224, values for bases 37..62 start. Here, 'A' has the value 10
+ At offset 208, values for bases 37..62 start. Here, 'A' has the value 10
(in decimal) and 'a' has the value 36. */
#define X 0xff
@@ -51,7 +51,6 @@
X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X,
- X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, X, X, X, X, X, X,
X,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
25,26,27,28,29,30,31,32,33,34,35,X, X, X, X, X,
diff -r d5d962ca11c6 -r 665b15ea3738 mpf/set_str.c
--- a/mpf/set_str.c Wed Feb 13 14:00:11 2013 +0100
+++ b/mpf/set_str.c Thu Feb 14 08:46:30 2013 +0100
@@ -3,7 +3,7 @@
of STRING is used to figure out the base.
Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2005, 2007,
-2008, 2011 Free Software Foundation, Inc.
+2008, 2011, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -154,7 +154,7 @@
{
/* For bases > 36, use the collating sequence
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz. */
- digit_value += 224;
+ digit_value += 208;
if (base > 62)
return -1; /* too large base */
}
diff -r d5d962ca11c6 -r 665b15ea3738 mpn/generic/brootinv.c
--- a/mpn/generic/brootinv.c Wed Feb 13 14:00:11 2013 +0100
+++ b/mpn/generic/brootinv.c Thu Feb 14 08:46:30 2013 +0100
@@ -2,7 +2,7 @@
Contributed to the GNU project by Martin Boij (as part of perfpow.c).
-Copyright 2009, 2010, 2012 Free Software Foundation, Inc.
+Copyright 2009, 2010, 2012, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
diff -r d5d962ca11c6 -r 665b15ea3738 mpz/inp_str.c
--- a/mpz/inp_str.c Wed Feb 13 14:00:11 2013 +0100
+++ b/mpz/inp_str.c Thu Feb 14 08:46:30 2013 +0100
@@ -5,8 +5,8 @@
REST ARE INTERNALS AND ARE ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE
CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES.
-Copyright 1991, 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003, 2011,
+2012, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -72,7 +72,7 @@
{
/* For bases > 36, use the collating sequence
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz. */
- digit_value += 224;
+ digit_value += 208;
if (base > 62)
return 0; /* too large base */
}
diff -r d5d962ca11c6 -r 665b15ea3738 mpz/set_str.c
--- a/mpz/set_str.c Wed Feb 13 14:00:11 2013 +0100
+++ b/mpz/set_str.c Thu Feb 14 08:46:30 2013 +0100
@@ -5,7 +5,7 @@
0oo...o means base 8, otherwise assume base 10.
Copyright 1991, 1993, 1994, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005,
-2011, 2012 Free Software Foundation, Inc.
+2011, 2012, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -47,7 +47,7 @@
{
/* For bases > 36, use the collating sequence
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz. */
- digit_value += 224;
+ digit_value += 208;
if (base > 62)
return -1; /* too large base */
}
More information about the gmp-commit
mailing list