summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/k_sinl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/k_sinl.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_sinl.c b/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
index 0e53a62a84..2050cd2b49 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point sine on <-pi/4,pi/4>.
- Copyright (C) 1999-2014 Free Software Foundation, Inc.
+ Copyright (C) 1999-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <float.h>
#include <math.h>
#include <math_private.h>
@@ -93,7 +94,14 @@ __kernel_sinl(long double x, long double y, int iy)
/* Argument is small enough to approximate it by a Chebyshev
polynomial of degree 17. */
if (tix < 0x3c600000) /* |x| < 2^-57 */
- if (!((int)x)) return x; /* generate inexact */
+ {
+ if (fabsl (x) < LDBL_MIN)
+ {
+ long double force_underflow = x * x;
+ math_force_eval (force_underflow);
+ }
+ if (!((int)x)) return x; /* generate inexact */
+ }
z = x * x;
return x + (x * (z*(SIN1+z*(SIN2+z*(SIN3+z*(SIN4+
z*(SIN5+z*(SIN6+z*(SIN7+z*SIN8)))))))));