summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2005-11-28 05:35:32 +0000
committerbde <bde@FreeBSD.org>2005-11-28 05:35:32 +0000
commit35eb86d16d6eacefb489841760c6e7f94ff78709 (patch)
tree0af25660fd22009a1357512539beefc1f50c6a84 /lib/msun
parent8fdb019b17b81e105fc5bbc8e85f22485f79668f (diff)
downloadFreeBSD-src-35eb86d16d6eacefb489841760c6e7f94ff78709.zip
FreeBSD-src-35eb86d16d6eacefb489841760c6e7f94ff78709.tar.gz
Changed spelling of the request-to-inline macro name to match the change
of the function name. Added my (non-)copyright. In k_tanf.c, added the first set of redundant parentheses to control grouping which was claimed to be added in the previous commit.
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