diff libquadmath/math/sinq_kernel.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line diff
--- a/libquadmath/math/sinq_kernel.c	Thu Oct 25 07:37:49 2018 +0900
+++ b/libquadmath/math/sinq_kernel.c	Thu Feb 13 11:34:05 2020 +0900
@@ -1,5 +1,5 @@
 /* Quad-precision floating point sine on <-pi/4,pi/4>.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999-2018 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jj@ultra.linux.cz>
 
@@ -14,9 +14,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include "quadmath-imp.h"
 
@@ -70,14 +69,14 @@
 -2.50521016467996193495359189395805639E-08Q, /* bfe5ae644ee90c47dc71839de75b2787 */
 };
 
-#define SINCOSQ_COS_HI 0
-#define SINCOSQ_COS_LO 1
-#define SINCOSQ_SIN_HI 2
-#define SINCOSQ_SIN_LO 3
+#define SINCOSL_COS_HI 0
+#define SINCOSL_COS_LO 1
+#define SINCOSL_SIN_HI 2
+#define SINCOSL_SIN_LO 3
 extern const __float128 __sincosq_table[];
 
 __float128
-__quadmath_kernel_sinq (__float128 x, __float128 y, int iy)
+__quadmath_kernel_sinq(__float128 x, __float128 y, int iy)
 {
   __float128 h, l, z, sin_l, cos_l_m1;
   int64_t ix;
@@ -101,7 +100,7 @@
   else
     {
       /* So that we don't have to use too large polynomial,  we find
-	 l and h such that x = l + h,  where fabsl(l) <= 1.0/256 with 83
+	 l and h such that x = l + h,  where fabsq(l) <= 1.0/256 with 83
 	 possible values for h.  We look up cosq(h) and sinq(h) in
 	 pre-computed tables,  compute cosq(l) and sinq(l) using a
 	 Chebyshev polynomial of degree 10(11) and compute
@@ -125,10 +124,10 @@
       z = l * l;
       sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
       cos_l_m1 = z*(SCOS1+z*(SCOS2+z*(SCOS3+z*(SCOS4+z*SCOS5))));
-      z = __sincosq_table [index + SINCOSQ_SIN_HI]
-	  + (__sincosq_table [index + SINCOSQ_SIN_LO]
-	     + (__sincosq_table [index + SINCOSQ_SIN_HI] * cos_l_m1)
-	     + (__sincosq_table [index + SINCOSQ_COS_HI] * sin_l));
+      z = __sincosq_table [index + SINCOSL_SIN_HI]
+	  + (__sincosq_table [index + SINCOSL_SIN_LO]
+	     + (__sincosq_table [index + SINCOSL_SIN_HI] * cos_l_m1)
+	     + (__sincosq_table [index + SINCOSL_COS_HI] * sin_l));
       return (ix < 0) ? -z : z;
     }
 }