about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2009-05-22 08:35:15 -0700
committerUlrich Drepper <drepper@redhat.com>2009-05-22 08:35:15 -0700
commit38ae768d88c47dd06030104eb3376212b0d8d164 (patch)
tree0646aa5dd41d96365cd73a5a658c76642c9cfd21 /sysdeps/ieee754/ldbl-128ibm/s_sinl.c
parent0323b051be1bee42592e6813064031aacfd6063d (diff)
downloadglibc-38ae768d88c47dd06030104eb3376212b0d8d164.tar.gz
glibc-38ae768d88c47dd06030104eb3376212b0d8d164.tar.xz
glibc-38ae768d88c47dd06030104eb3376212b0d8d164.zip
Fix errno for IBM long double.
After the last addition to the math test suite PPC routines haven't
been adjusted so far.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_sinl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_sinl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_sinl.c b/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
index 8cc592c612..bd72225e18 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
@@ -44,6 +44,7 @@
  *	TRIG(x) returns trig(x) nearly rounded
  */
 
+#include <errno.h>
 #include "math.h"
 #include "math_private.h"
 #include <math_ldbl_opt.h>
@@ -67,8 +68,11 @@
 	  return __kernel_sinl(x,z,0);
 
     /* sin(Inf or NaN) is NaN */
-	else if (ix>=0x7ff0000000000000LL) return x-x;
-
+	else if (ix>=0x7ff0000000000000LL) {
+	    if (ix == 0x7ff0000000000000LL)
+		__set_errno (EDOM);
+	    return x-x;
+	}
     /* argument reduction needed */
 	else {
 	    n = __ieee754_rem_pio2l(x,y);