summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/s_sin.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_sin.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_sin.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index b369ac9f5b..413540661f 100644
--- a/sysdeps/ieee754/dbl-64/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2019 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -14,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
/****************************************************************************/
/* */
@@ -41,6 +41,7 @@
#include "MathLib.h"
#include <math.h>
#include <math_private.h>
+#include <fenv_private.h>
#include <math-underflow.h>
#include <libm-alias-double.h>
#include <fenv.h>
@@ -96,8 +97,7 @@ int __branred (double x, double *a, double *aa);
of the number by combining the sin and cos of X (as computed by a variation
of the Taylor series) with the values looked up from the sin/cos table to
get the result. */
-static inline double
-__always_inline
+static __always_inline double
do_cos (double x, double dx)
{
mynumber u;
@@ -121,8 +121,7 @@ do_cos (double x, double dx)
the number by combining the sin and cos of X (as computed by a variation of
the Taylor series) with the values looked up from the sin/cos table to get
the result. */
-static inline double
-__always_inline
+static __always_inline double
do_sin (double x, double dx)
{
double xold = x;
@@ -143,15 +142,14 @@ do_sin (double x, double dx)
c = x * dx + xx * (cs2 + xx * (cs4 + xx * cs6));
SINCOS_TABLE_LOOKUP (u, sn, ssn, cs, ccs);
cor = (ssn + s * ccs - sn * c) + cs * s;
- return __copysign (sn + cor, xold);
+ return copysign (sn + cor, xold);
}
/* Reduce range of x to within PI/2 with abs (x) < 105414350. The high part
is written to *a, the low part to *da. Range reduction is accurate to 136
bits so that when x is large and *a very close to zero, all 53 bits of *a
are correct. */
-static inline int4
-__always_inline
+static __always_inline int4
reduce_sincos (double x, double *a, double *da)
{
mynumber v;
@@ -177,8 +175,7 @@ reduce_sincos (double x, double *a, double *da)
}
/* Compute sin or cos (A + DA) for the given quadrant N. */
-static double
-__always_inline
+static __always_inline double
do_sincos (double a, double da, int4 n)
{
double retval;
@@ -230,7 +227,7 @@ __sin (double x)
{
t = hp0 - fabs (x);
/* Max ULP is 0.51. */
- retval = __copysign (do_cos (t, hp1), x);
+ retval = copysign (do_cos (t, hp1), x);
} /* else if (k < 0x400368fd) */
/*-------------------------- 2.426265<|x|< 105414350 ----------------------*/