Date: Sat, 13 Nov 2010 10:54:10 +0000 (UTC) From: Ulrich Spoerlein <uqs@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/msun/src e_jn.c e_jnf.c Message-ID: <201011131054.oADAsSeu021857@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
uqs 2010-11-13 10:54:10 UTC FreeBSD src repository Modified files: lib/msun/src e_jn.c e_jnf.c Log: SVN rev 215237 on 2010-11-13 10:54:10Z by uqs Fix bug in jn(3) and jnf(3) that led to -inf results Explanation by Steve: jn[f](n,x) for certain ranges of x uses downward recursion to compute the value of the function. The recursion sequence that is generated is proportional to the actual desired value, so a normalization step is taken. This normalization is j0[f](x) divided by the zeroth sequence member. As Bruce notes, near the zeros of j0[f](x) the computed value can have giga-ULP inaccuracy. I found for the 1st zero of j0f(x) only the leading decimal digit is correct. The solution to the issue is fairly straight forward. The zeros of j0(x) and j1(x) never coincide, so as j0(x) approaches a zero, the normalization constant switches to j1[f](x) divided by the 2nd sequence member. The expectation is that j1[f](x) is a more accurately computed value. PR: bin/144306 Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu> Reviewed by: bde MFC after: 7 days Revision Changes Path 1.11 +6 -1 src/lib/msun/src/e_jn.c 1.11 +6 -1 src/lib/msun/src/e_jnf.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011131054.oADAsSeu021857>