summaryrefslogtreecommitdiff
path: root/libquadmath/math/sinq.c
diff options
context:
space:
mode:
Diffstat (limited to 'libquadmath/math/sinq.c')
-rw-r--r--libquadmath/math/sinq.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libquadmath/math/sinq.c b/libquadmath/math/sinq.c
index 989f679d6d6..d381f3ac40a 100644
--- a/libquadmath/math/sinq.c
+++ b/libquadmath/math/sinq.c
@@ -1,4 +1,4 @@
-/* sinq.c -- __float128 version of s_sin.c.
+/* s_sinl.c -- long double version of s_sin.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -17,8 +17,8 @@
* Return sine function of x.
*
* kernel function:
- * __quadmath_kernel_sinq ... sine function on [-pi/4,pi/4]
- * __quadmath_kernel_cosq ... cose function on [-pi/4,pi/4]
+ * __quadmath_kernel_sinq ... sine function on [-pi/4,pi/4]
+ * __quadmath_kernel_cosq ... cose function on [-pi/4,pi/4]
* __quadmath_rem_pio2q ... argument reduction routine
*
* Method.
@@ -46,10 +46,9 @@
#include "quadmath-imp.h"
-__float128
-sinq (__float128 x)
+__float128 sinq(__float128 x)
{
- __float128 y[2],z=0.0Q;
+ __float128 y[2],z=0;
int64_t n, ix;
/* High word of x. */
@@ -64,6 +63,8 @@ sinq (__float128 x)
else if (ix>=0x7fff000000000000LL) {
if (ix == 0x7fff000000000000LL) {
GET_FLT128_LSW64(n,x);
+ if (n == 0)
+ errno = EDOM;
}
return x-x;
}