summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/k_tanf.c7
-rw-r--r--lib/msun/src/s_tanf.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/msun/src/k_tanf.c b/lib/msun/src/k_tanf.c
index 850248e..8d08474 100644
--- a/lib/msun/src/k_tanf.c
+++ b/lib/msun/src/k_tanf.c
@@ -1,5 +1,6 @@
/* k_tanf.c -- float version of k_tan.c
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ * Optimized by Bruce D. Evans.
*/
/*
@@ -12,7 +13,7 @@
* ====================================================
*/
-#ifndef INLINE_KERNEL_TANF
+#ifndef INLINE_KERNEL_TANDF
#ifndef lint
static char rcsid[] = "$FreeBSD$";
#endif
@@ -32,7 +33,7 @@ T[] = {
0x1362b9bf971bcd.0p-59, /* 0.00946564784943673166728 */
};
-#ifdef INLINE_KERNEL_TANF
+#ifdef INLINE_KERNEL_TANDF
extern inline
#endif
float
@@ -46,7 +47,7 @@ __kernel_tandf(double x, int iy)
* x^5*(T[1]+x^4*T[3]+x^8*T[5]) +
* x^5*(x^2*(T[2]+x^4*T[4]))
*/
- r = T[1]+w*(T[3]+w*T[5]) + z*(T[2]+w*T[4]);
+ r = (T[1]+w*(T[3]+w*T[5])) + z*(T[2]+w*T[4]);
s = z*x;
r = (x+s*T[0])+(s*z)*r;
if(iy==1) return r;
diff --git a/lib/msun/src/s_tanf.c b/lib/msun/src/s_tanf.c
index a78957f..9a83555 100644
--- a/lib/msun/src/s_tanf.c
+++ b/lib/msun/src/s_tanf.c
@@ -1,5 +1,6 @@
/* s_tanf.c -- float version of s_tan.c.
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ * Optimized by Bruce D. Evans.
*/
/*
@@ -18,7 +19,7 @@ static char rcsid[] = "$FreeBSD$";
#endif
#include "math.h"
-#define INLINE_KERNEL_TANF
+#define INLINE_KERNEL_TANDF
#include "math_private.h"
#include "k_tanf.c"
OpenPOWER on IntegriCloud