This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.17-24-gda08f64
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 2 Jan 2013 04:58:28 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.17-24-gda08f64
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via da08f647d58d674db08cdb3e61c8826c89470e2e (commit)
from 38686a0363dcd2ce65bebf2055864e403aab1dff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da08f647d58d674db08cdb3e61c8826c89470e2e
commit da08f647d58d674db08cdb3e61c8826c89470e2e
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Fri Dec 21 09:15:10 2012 +0530
Move more constants into static variables
Code cleanup.
diff --git a/ChangeLog b/ChangeLog
index 894f183..fe304e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-01-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/ieee754/dbl-64/mpa.c [! NO__CONST]: New constant
+ MPTWO.
+ (__inv): Remove local variable MPTWO to use the global
+ constant.
+ * sysdeps/ieee754/dbl-64/mpa.h: Declare MPTWO.
+ * sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Remove local
+ variable MPTWO.
+ * sysdeps/ieee754/dbl-64/mpsqrt.c (__mpsqrt): Make MPHALF and
+ MP3HALFS static const.
+
2013-01-01 David S. Miller <davem@davemloft.net>
* po/ca.po: Update from translation team.
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index c868c63..499dbd3 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -53,6 +53,7 @@
#ifndef NO__CONST
const mp_no mpone = {1, {1.0, 1.0}};
+const mp_no mptwo = {1, {1.0, 2.0}};
#endif
#ifndef NO___ACR
@@ -494,10 +495,6 @@ void __inv(const mp_no *x, mp_no *y, int p) {
mp_no z,w;
static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
- const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
__cpy(x,&z,p); z.e=0; __mp_dbl(&z,&t,p);
t=ONE/t; __dbl_mp(t,y,p); EY -= EX;
diff --git a/sysdeps/ieee754/dbl-64/mpa.h b/sysdeps/ieee754/dbl-64/mpa.h
index 4fdecb6..2a2deb4 100644
--- a/sysdeps/ieee754/dbl-64/mpa.h
+++ b/sysdeps/ieee754/dbl-64/mpa.h
@@ -55,6 +55,7 @@ typedef struct {/* This structure holds the details of a multi-precision */
typedef union { int i[2]; double d; } number;
extern const mp_no mpone;
+extern const mp_no mptwo;
#define X x->d
#define Y y->d
diff --git a/sysdeps/ieee754/dbl-64/mpatan.c b/sysdeps/ieee754/dbl-64/mpatan.c
index 69d145c..d88ee69 100644
--- a/sysdeps/ieee754/dbl-64/mpatan.c
+++ b/sysdeps/ieee754/dbl-64/mpatan.c
@@ -48,16 +48,13 @@ __mpatan(mp_no *x, mp_no *y, int p) {
int i,m,n;
double dx;
mp_no
- mptwo = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mptwoim1 = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mps,mpsm,mpt,mpt1,mpt2,mpt3;
- /* Choose m and initiate mptwo & mptwoim1 */
+ /* Choose m and initiate mptwoim1 */
if (EX>0) m=7;
else if (EX<0) m=0;
else {
@@ -65,9 +62,8 @@ __mpatan(mp_no *x, mp_no *y, int p) {
for (m=6; m>0; m--)
{if (dx>__atan_xm[m].d) break;}
}
- mptwo.e = mptwoim1.e = 1;
- mptwo.d[0] = mptwoim1.d[0] = ONE;
- mptwo.d[1] = TWO;
+ mptwoim1.e = 1;
+ mptwoim1.d[0] = ONE;
/* Reduce x m times */
__mul(x,x,&mpsm,p);
diff --git a/sysdeps/ieee754/dbl-64/mpsqrt.c b/sysdeps/ieee754/dbl-64/mpsqrt.c
index 87bc22e..de0eb70 100644
--- a/sysdeps/ieee754/dbl-64/mpsqrt.c
+++ b/sysdeps/ieee754/dbl-64/mpsqrt.c
@@ -52,19 +52,11 @@ SECTION
__mpsqrt(mp_no *x, mp_no *y, int p) {
int i,m,ey;
double dx,dy;
- mp_no
- mphalf = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
- mp3halfs = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
+ static const mp_no
+ mphalf = {0,{1.0,8388608.0 /* 2^23 */}},
+ mp3halfs = {1,{1.0,1.0,8388608.0 /* 2^23 */}};
mp_no mpxn,mpz,mpu,mpt1,mpt2;
- /* Prepare multi-precision 1/2 and 3/2 */
- mphalf.e =0; mphalf.d[0] =ONE; mphalf.d[1] =HALFRAD;
- mp3halfs.e=1; mp3halfs.d[0]=ONE; mp3halfs.d[1]=ONE; mp3halfs.d[2]=HALFRAD;
-
ey=EX/2; __cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
__mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); __dbl_mp(dy,&mpu,p);
__mul(&mpxn,&mphalf,&mpz,p);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
sysdeps/ieee754/dbl-64/mpa.c | 5 +----
sysdeps/ieee754/dbl-64/mpa.h | 1 +
sysdeps/ieee754/dbl-64/mpatan.c | 10 +++-------
sysdeps/ieee754/dbl-64/mpsqrt.c | 14 +++-----------
5 files changed, 20 insertions(+), 22 deletions(-)
hooks/post-receive
--
GNU C Library master sources