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.23-421-gaf0cfba


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  af0cfbaf1df1549ca0bc70bd6b4bc54004d11680 (commit)
      from  c24480ce3b5fed848243fc9642932ef2fa670109 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af0cfbaf1df1549ca0bc70bd6b4bc54004d11680

commit af0cfbaf1df1549ca0bc70bd6b4bc54004d11680
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jun 6 22:10:11 2016 +0000

    Fix dbl-64 acos (sNaN) (bug 20212).
    
    The dbl-64 version of acos returns sNaN for sNaN arguments.  This
    patch fixes it to add NaN arguments to themselves so that qNaN is
    returned in this case.
    
    Tested for x86_64 and x86.
    
    	[BZ #20212]
    	* sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_acos): Add NaN
    	argument to itself.
    	* math/libm-test.inc (acos_test_data): Add sNaN tests.

diff --git a/ChangeLog b/ChangeLog
index 6c1c36a..9930b5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-06-06  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #20212]
+	* sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_acos): Add NaN
+	argument to itself.
+	* math/libm-test.inc (acos_test_data): Add sNaN tests.
+
 2016-06-06  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
 	* sysdeps/powerpc/powerpc64/power8/strcasestr.S (__strcasestr):
diff --git a/math/libm-test.inc b/math/libm-test.inc
index aaa0148..6981720 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -1799,6 +1799,8 @@ static const struct test_f_f_data acos_test_data[] =
     TEST_f_f (acos, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
     TEST_f_f (acos, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (acos, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_f (acos, snan_value, qnan_value, INVALID_EXCEPTION),
+    TEST_f_f (acos, -snan_value, qnan_value, INVALID_EXCEPTION),
 
     /* |x| > 1: */
     TEST_f_f (acos, 1.125L, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c
index d8c012d..5d5fb01 100644
--- a/sysdeps/ieee754/dbl-64/e_asin.c
+++ b/sysdeps/ieee754/dbl-64/e_asin.c
@@ -633,7 +633,7 @@ __ieee754_acos(double x)
   else
   if (k==0x3ff00000 && u.i[LOW_HALF]==0) return (m>0)?0:2.0*hp0.x;
   else
-  if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x;
+  if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x + x;
   else {
     u.i[HIGH_HALF]=0x7ff00000;
     v.i[HIGH_HALF]=0x7ff00000;

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

Summary of changes:
 ChangeLog                       |    7 +++++++
 math/libm-test.inc              |    2 ++
 sysdeps/ieee754/dbl-64/e_asin.c |    2 +-
 3 files changed, 10 insertions(+), 1 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]