This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-236-g22af19f


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  22af19f9fb1909690dbe9840c0de093b656b4a68 (commit)
      from  4709fe7602b56e9f6ee1ab6afb4067409a784f29 (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=22af19f9fb1909690dbe9840c0de093b656b4a68

commit 22af19f9fb1909690dbe9840c0de093b656b4a68
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Sat Feb 16 00:15:57 2013 +0530

    Don't require LIM to determine loop end in __sqr

diff --git a/ChangeLog b/ChangeLog
index 607433b..cfddab0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-02-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+	* sysdeps/ieee754/dbl-64/mpa.c (__sqr): Avoid using LIM in
+	loop termination condition.
+
 	* sysdeps/ieee754/dbl-64/mpa.c (__mul): Use intermediate
 	variable to calculate EZ.
 	(__sqr): Likewise.
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index 9da4257..1f60fa5 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -747,12 +747,9 @@ __sqr (const mp_no *x, mp_no *y, int p)
       long lim = k / 2;
 
       if (k % 2 == 0)
-        {
-	  yk += X[lim] * X[lim];
-	  lim--;
-	}
+	yk += X[lim] * X[lim];
 
-      for (i = k - p, j = p; i <= lim; i++, j--)
+      for (i = k - p, j = p; i < j; i++, j--)
 	yk2 += X[i] * X[j];
 
       yk += 2.0 * yk2;
@@ -770,12 +767,9 @@ __sqr (const mp_no *x, mp_no *y, int p)
       long lim = k / 2;
 
       if (k % 2 == 0)
-        {
-	  yk += X[lim] * X[lim];
-	  lim--;
-	}
+	yk += X[lim] * X[lim];
 
-      for (i = 1, j = k - 1; i <= lim; i++, j--)
+      for (i = 1, j = k - 1; i < j; i++, j--)
 	yk2 += X[i] * X[j];
 
       yk += 2.0 * yk2;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                    |    3 +++
 sysdeps/ieee754/dbl-64/mpa.c |   14 ++++----------
 2 files changed, 7 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]