about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/s_sinl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_sinl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_sinl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_sinl.c b/sysdeps/ieee754/ldbl-128/s_sinl.c
index 446a75f126..dc509e72e5 100644
--- a/sysdeps/ieee754/ldbl-128/s_sinl.c
+++ b/sysdeps/ieee754/ldbl-128/s_sinl.c
@@ -44,6 +44,7 @@
  *	TRIG(x) returns trig(x) nearly rounded
  */
 
+#include <errno.h>
 #include "math.h"
 #include "math_private.h"
 
@@ -66,7 +67,14 @@
 	  return __kernel_sinl(x,z,0);
 
     /* sin(Inf or NaN) is NaN */
-	else if (ix>=0x7fff000000000000LL) return x-x;
+	else if (ix>=0x7fff000000000000LL) {
+	    if (ix == 0x7fff000000000000LL) {
+		GET_LDOUBLE_LSW64(n,x);
+		if (n == 0)
+		    __set_errno (EDOM);
+	    }
+	    return x-x;
+	}
 
     /* argument reduction needed */
 	else {