Date: Thu, 4 Dec 2014 15:57:59 +0000 (UTC) From: Steve Kargl <kargl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275476 - head/lib/msun/src Message-ID: <201412041557.sB4FvxH8093590@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kargl Date: Thu Dec 4 15:57:58 2014 New Revision: 275476 URL: https://svnweb.freebsd.org/changeset/base/275476 Log: 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 Modified: head/lib/msun/src/e_j0f.c Modified: head/lib/msun/src/e_j0f.c ============================================================================== --- head/lib/msun/src/e_j0f.c Thu Dec 4 15:54:45 2014 (r275475) +++ head/lib/msun/src/e_j0f.c Thu Dec 4 15:57:58 2014 (r275476) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412041557.sB4FvxH8093590>