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.15-469-gc0df8e6


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  c0df8e693f34b535bd6ee1b691bc4ca6bc3b4579 (commit)
      from  e4d91429aefd7f3ad97457f8935cf675aacfde2a (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=c0df8e693f34b535bd6ee1b691bc4ca6bc3b4579

commit c0df8e693f34b535bd6ee1b691bc4ca6bc3b4579
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Mar 22 12:52:50 2012 +0000

    Fix low-part sign handling in sin/cos for ldbl-128 and ldbl-128ibm.

diff --git a/ChangeLog b/ChangeLog
index 33bb4f8..a993315 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-03-22  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/ieee754/ldbl-128/k_cosl.c (__kernel_cosl): Negate y if
+	negating x to take absolute value.
+	* sysdeps/ieee754/ldbl-128/k_sincosl.c (__kernel_sincosl):
+	Likewise.
+	* sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Likewise.
+	* sysdeps/ieee754/ldbl-128ibm/k_sincosl.c (__kernel_sincosl):
+	Likewise.
+	* sysdeps/ieee754/ldbl-128/k_sinl.c (__kernel_sinl): Negate y when
+	computing low part if x was negated.
+	* sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise.
+
 2012-03-21  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* elf/tst-auditmod1.c: Support la_x32_gnu_pltenter and
diff --git a/sysdeps/ieee754/ldbl-128/k_cosl.c b/sysdeps/ieee754/ldbl-128/k_cosl.c
index 4cb9dd1..aa447ec 100644
--- a/sysdeps/ieee754/ldbl-128/k_cosl.c
+++ b/sysdeps/ieee754/ldbl-128/k_cosl.c
@@ -105,7 +105,11 @@ __kernel_cosl(long double x, long double y)
 	 cosl(h+l) = cosl(h)cosl(l) - sinl(h)sinl(l).  */
       index = 0x3ffe - (tix >> 16);
       hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
-      x = fabsl (x);
+      if (signbit (x))
+	{
+	  x = -x;
+	  y = -y;
+	}
       switch (index)
 	{
 	case 0: index = ((45 << 10) + hix - 0x3ffe0000) >> 8; break;
diff --git a/sysdeps/ieee754/ldbl-128/k_sincosl.c b/sysdeps/ieee754/ldbl-128/k_sincosl.c
index 98c5d62..00a21c4 100644
--- a/sysdeps/ieee754/ldbl-128/k_sincosl.c
+++ b/sysdeps/ieee754/ldbl-128/k_sincosl.c
@@ -132,7 +132,11 @@ __kernel_sincosl(long double x, long double y, long double *sinx, long double *c
 	 cosl(h+l) = cosl(h)cosl(l) - sinl(h)sinl(l).  */
       index = 0x3ffe - (tix >> 16);
       hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
-      x = fabsl (x);
+      if (signbit (x))
+	{
+	  x = -x;
+	  y = -y;
+	}
       switch (index)
 	{
 	case 0: index = ((45 << 10) + hix - 0x3ffe0000) >> 8; break;
diff --git a/sysdeps/ieee754/ldbl-128/k_sinl.c b/sysdeps/ieee754/ldbl-128/k_sinl.c
index 6eaf878..1f0ca8c 100644
--- a/sysdeps/ieee754/ldbl-128/k_sinl.c
+++ b/sysdeps/ieee754/ldbl-128/k_sinl.c
@@ -116,7 +116,7 @@ __kernel_sinl(long double x, long double y, int iy)
 
       SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
       if (iy)
-	l = y - (h - x);
+	l = (ix < 0 ? -y : y) - (h - x);
       else
 	l = x - h;
       z = l * l;
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_cosl.c b/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
index 5241431..fc01374 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
@@ -123,7 +123,11 @@ __kernel_cosl(long double x, long double y)
     
       index = 0x3fe - (tix >> 20);
       hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
-      x = fabsl (x);
+      if (signbit (x))
+	{
+	  x = -x;
+	  y = -y;
+	}
       switch (index)
 	{
 	case 0: index = ((45 << 14) + hix - 0x3fe00000) >> 12; break;
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c b/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c
index f3dd954..98fe07d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c
@@ -151,7 +151,11 @@ __kernel_sincosl(long double x, long double y, long double *sinx, long double *c
 
       index = 0x3fe - (tix >> 20);
       hix = (tix + (0x2000 << index)) & (0xffffc000 << index);
-      x = fabsl (x);
+      if (signbit (x))
+	{
+	  x = -x;
+	  y = -y;
+	}
       switch (index)
 	{
 	case 0: index = ((45 << 14) + hix - 0x3fe00000) >> 12; break;
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_sinl.c b/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
index 484b65f..94aba0b 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
@@ -134,7 +134,7 @@ __kernel_sinl(long double x, long double y, int iy)
 */
       SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
       if (iy)
-	l = y - (h - x);
+	l = (ix < 0 ? -y : y) - (h - x);
       else
 	l = x - h;
       z = l * l;

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

Summary of changes:
 ChangeLog                               |   13 +++++++++++++
 sysdeps/ieee754/ldbl-128/k_cosl.c       |    6 +++++-
 sysdeps/ieee754/ldbl-128/k_sincosl.c    |    6 +++++-
 sysdeps/ieee754/ldbl-128/k_sinl.c       |    2 +-
 sysdeps/ieee754/ldbl-128ibm/k_cosl.c    |    6 +++++-
 sysdeps/ieee754/ldbl-128ibm/k_sincosl.c |    6 +++++-
 sysdeps/ieee754/ldbl-128ibm/k_sinl.c    |    2 +-
 7 files changed, 35 insertions(+), 6 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]