From owner-cvs-src-old@FreeBSD.ORG Sat Nov 13 10:54:29 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29BAA106566B for ; Sat, 13 Nov 2010 10:54:29 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 168AE8FC16 for ; Sat, 13 Nov 2010 10:54:29 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oADAsSq6021858 for ; Sat, 13 Nov 2010 10:54:28 GMT (envelope-from uqs@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oADAsSeu021857 for cvs-src-old@freebsd.org; Sat, 13 Nov 2010 10:54:28 GMT (envelope-from uqs@repoman.freebsd.org) Message-Id: <201011131054.oADAsSeu021857@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to uqs@repoman.freebsd.org using -f From: Ulrich Spoerlein Date: Sat, 13 Nov 2010 10:54:10 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/msun/src e_jn.c e_jnf.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 10:54:29 -0000 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 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