/* Quad-precision floating point sine on <-pi/4,pi/4>.
- Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2024 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 GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
/* 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. */
/* 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)))))))));