summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authorkargl <kargl@FreeBSD.org>2014-12-04 15:57:58 +0000
committerkargl <kargl@FreeBSD.org>2014-12-04 15:57:58 +0000
commit3d8ac464a1bb45ffad4e06ad83ee0bead571e3f9 (patch)
tree26de1dee5338f5dc50e119b122c6a264dc768d8f /lib/msun
parent173190c9f87be20e0cd6b88bad2ab4fdce0bd26f (diff)
downloadFreeBSD-src-3d8ac464a1bb45ffad4e06ad83ee0bead571e3f9.zip
FreeBSD-src-3d8ac464a1bb45ffad4e06ad83ee0bead571e3f9.tar.gz
Fix a 20+ year bug by using an appropriate constant for
the transition from one asymptotic approximation to another for the zeroth order Bessel and Neumann functions. Reviewed by: bde
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/e_j0f.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/msun/src/e_j0f.c b/lib/msun/src/e_j0f.c
index c45faf3..0a5bec9 100644
--- a/lib/msun/src/e_j0f.c
+++ b/lib/msun/src/e_j0f.c
@@ -62,7 +62,7 @@ __ieee754_j0f(float x)
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
* y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
*/
- if(ix>0x80000000) z = (invsqrtpi*cc)/sqrtf(x);
+ if(ix>0x54000000) z = (invsqrtpi*cc)/sqrtf(x);
else {
u = pzerof(x); v = qzerof(x);
z = invsqrtpi*(u*cc-v*ss)/sqrtf(x);
@@ -136,7 +136,7 @@ __ieee754_y0f(float x)
if ((s*c)<zero) cc = z/ss;
else ss = z/cc;
}
- if(ix>0x80000000) z = (invsqrtpi*ss)/sqrtf(x);
+ if(ix>0x54800000) z = (invsqrtpi*ss)/sqrtf(x);
else {
u = pzerof(x); v = qzerof(x);
z = invsqrtpi*(u*ss+v*cc)/sqrtf(x);
OpenPOWER on IntegriCloud