summary refs log tree commit diff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2016-07-18 22:33:09 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2016-07-18 22:33:09 +0530
commitcbf88869edced4b23d792d95a8626e35b831df35 (patch)
treeb1ed5b36db2734e3dc0d4bcb4b6051630f7cbd0d /math/auto-libm-test-in
parent2413e73c32fc36470885ae548631e081d66f4201 (diff)
downloadglibc-cbf88869edced4b23d792d95a8626e35b831df35.tar.gz
glibc-cbf88869edced4b23d792d95a8626e35b831df35.tar.xz
glibc-cbf88869edced4b23d792d95a8626e35b831df35.zip
Fix cos computation for multiple precision fallback (bz #20357)
During the sincos consolidation I made two mistakes, one was a logical
error due to which cos(0x1.8475e5afd4481p+0) returned
sin(0x1.8475e5afd4481p+0) instead.

The second issue was an error in negating inputs for the correct
quadrants for sine.  I could not find a suitable test case for this
despite running a program to search for such an input for a couple of
hours.

Following patch fixes both issues.  Tested on x86_64.  Thanks to Matt
Clay for identifying the issue.

	[BZ #20357]
	* sysdeps/ieee754/dbl-64/s_sin.c (sloww): Fix up condition
	to call __mpsin/__mpcos and to negate values.
	* math/auto-libm-test-in: Add test.
	* math/auto-libm-test-out: Regenerate.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r--math/auto-libm-test-in3
1 files changed, 3 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index ffcc40a8c6..51c152c231 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -1144,6 +1144,7 @@ cos 0x4.7857dp+68
 cos -0x1.02e34cp+0
 cos 0xf.f0274p+4
 cos 0x3.042d88p+0
+cos 0x1.8475e5afd4481p+0
 
 cosh 0
 cosh -0
@@ -3818,6 +3819,7 @@ sin min
 sin -min
 sin min_subnorm
 sin -min_subnorm
+sin 0x1.8475e5afd4481p+0
 
 sincos 0
 sincos -0
@@ -3852,6 +3854,7 @@ sincos min
 sincos -min
 sincos min_subnorm
 sincos -min_subnorm
+sincos 0x1.8475e5afd4481p+0
 
 sinh 0
 sinh -0