summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authorkargl <kargl@FreeBSD.org>2014-12-05 19:00:55 +0000
committerkargl <kargl@FreeBSD.org>2014-12-05 19:00:55 +0000
commit0f3dfaa123f606f75c499d40c622b4f82b711988 (patch)
treeb43e5d67a686939b0fe7a743e1d34c27c4687781 /lib/msun
parent5bff99fba826d3e649da503c0ad97affc36629af (diff)
downloadFreeBSD-src-0f3dfaa123f606f75c499d40c622b4f82b711988.zip
FreeBSD-src-0f3dfaa123f606f75c499d40c622b4f82b711988.tar.gz
Update the constants associated with the evaluation of j0f(x)
for |x| small. While here, remove the explicit cast of 0.25 to float. Replace a multiplication involving 0.25 by a division using an integer constant 4. Make a similar change in j0() to minimize the diff. Suggested by: bde
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/e_j0.c2
-rw-r--r--lib/msun/src/e_j0f.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/msun/src/e_j0.c b/lib/msun/src/e_j0.c
index 8320f25..a1ac7c7 100644
--- a/lib/msun/src/e_j0.c
+++ b/lib/msun/src/e_j0.c
@@ -115,7 +115,7 @@ __ieee754_j0(double x)
if(ix<0x3f200000) { /* |x| < 2**-13 */
if(huge+x>one) { /* raise inexact if x != 0 */
if(ix<0x3e400000) return one; /* |x|<2**-27 */
- else return one - 0.25*x*x;
+ else return one - x*x/4;
}
}
z = x*x;
diff --git a/lib/msun/src/e_j0f.c b/lib/msun/src/e_j0f.c
index 0a5bec9..78f6f65 100644
--- a/lib/msun/src/e_j0f.c
+++ b/lib/msun/src/e_j0f.c
@@ -69,10 +69,10 @@ __ieee754_j0f(float x)
}
return z;
}
- if(ix<0x39000000) { /* |x| < 2**-13 */
+ if(ix<0x3c000000) { /* |x| < 2**-7 */
if(huge+x>one) { /* raise inexact if x != 0 */
- if(ix<0x32000000) return one; /* |x|<2**-27 */
- else return one - (float)0.25*x*x;
+ if(ix<0x39800000) return one; /* |x|<2**-12 */
+ else return one - x*x/4;
}
}
z = x*x;
OpenPOWER on IntegriCloud