diff options
author | bde <bde@FreeBSD.org> | 2005-11-28 05:46:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2005-11-28 05:46:13 +0000 |
commit | 9553dd02c7b046157e6d70b512ac45f21c97299a (patch) | |
tree | c0fcde3ba1dddfd1fc1e7e387d5b318c83ae761f /lib/msun/src | |
parent | 35eb86d16d6eacefb489841760c6e7f94ff78709 (diff) | |
download | FreeBSD-src-9553dd02c7b046157e6d70b512ac45f21c97299a.zip FreeBSD-src-9553dd02c7b046157e6d70b512ac45f21c97299a.tar.gz |
Try to use the "proximity" (~) operator consistently in comments
(x ~<= a, not x <= ~a). This got messed up in some places when the
comments were moved from e_rem_pio2f.c.
Added my (non-)copyright.
Diffstat (limited to 'lib/msun/src')
-rw-r--r-- | lib/msun/src/s_cosf.c | 9 | ||||
-rw-r--r-- | lib/msun/src/s_sinf.c | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/msun/src/s_cosf.c b/lib/msun/src/s_cosf.c index aa90ea2..42664e2 100644 --- a/lib/msun/src/s_cosf.c +++ b/lib/msun/src/s_cosf.c @@ -1,5 +1,6 @@ /* s_cosf.c -- float version of s_cos.c. * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + * Optimized by Bruce D. Evans. */ /* @@ -45,14 +46,14 @@ cosf(float x) if(((int)x)==0) return 1.0; /* 1 with inexact if x != 0 */ return __kernel_cosdf(x); } - if(ix<=0x407b53d1) { /* |x| <= ~5*pi/4 */ - if(ix<=0x4016cbe3) /* |x| <= ~3pi/4 */ + if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ + if(ix<=0x4016cbe3) /* |x| ~<= 3pi/4 */ return -__kernel_sindf(x - c1pio2); else return -__kernel_cosdf(x - c2pio2); } - if(ix<=0x40e231d5) { /* |x| <= ~9*pi/4 */ - if(ix<=0x40afeddf) /* |x| <= ~7*pi/4 */ + if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ + if(ix<=0x40afeddf) /* |x| ~<= 7*pi/4 */ return __kernel_sindf(x - c3pio2); else return __kernel_cosdf(x - c4pio2); diff --git a/lib/msun/src/s_sinf.c b/lib/msun/src/s_sinf.c index 4986d9a..dc46a68 100644 --- a/lib/msun/src/s_sinf.c +++ b/lib/msun/src/s_sinf.c @@ -1,5 +1,6 @@ /* s_sinf.c -- float version of s_sin.c. * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + * Optimized by Bruce D. Evans. */ /* @@ -45,8 +46,8 @@ sinf(float x) if(((int)x)==0) return x; /* x with inexact if x != 0 */ return __kernel_sindf(x); } - if(ix<=0x407b53d1) { /* |x| <= ~5*pi/4 */ - if(ix<=0x4016cbe3) { /* |x| <= ~3pi/4 */ + if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ + if(ix<=0x4016cbe3) { /* |x| ~<= 3pi/4 */ if(hx>0) return __kernel_cosdf(x - s1pio2); else @@ -54,8 +55,8 @@ sinf(float x) } else return -__kernel_sindf(x + (hx > 0 ? -s2pio2 : s2pio2)); } - if(ix<=0x40e231d5) { /* |x| <= ~9*pi/4 */ - if(ix<=0x40afeddf) { /* |x| <= ~7*pi/4 */ + if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ + if(ix<=0x40afeddf) { /* |x| ~<= 7*pi/4 */ if(hx>0) return -__kernel_cosdf(x - s3pio2); else |