]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/ieee754/ldbl-96/k_sinl.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / ieee754 / ldbl-96 / k_sinl.c
index f2d1c860e8cf72dc3d22ce16855f56038f60d035..6d5a0f7f090f5a54be99747f1645eb45dbb6f2bb 100644 (file)
@@ -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-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on quad-precision sine by Jakub Jelinek <jj@ultra.linux.cz>
 
 /* The polynomials have not been optimized for extended-precision and
    may contain more terms than needed.  */
 
+#include <float.h>
 #include <math.h>
 #include <math_private.h>
+#include <math-underflow.h>
 
 /* The polynomials have not been optimized for extended-precision and
    may contain more terms than needed.  */
@@ -94,7 +96,10 @@ __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 (absx < 0x1p-33L)
-       if (!((int)x)) return x;        /* generate inexact */
+       {
+         math_check_force_underflow (x);
+         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)))))))));