Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2010 04:20:03 GMT
From:      "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/144306: Nasty bug in jn(3)
Message-ID:  <201002260420.o1Q4K3SG044886@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/144306; it has been noted by GNATS.

From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: bin/144306: Nasty bug in jn(3)
Date: Thu, 25 Feb 2010 20:15:33 -0800 (PST)

 This patch fixes the problem.
 
 Index: e_jn.c
 ===================================================================
 --- e_jn.c	(revision 204219)
 +++ e_jn.c	(working copy)
 @@ -200,7 +200,12 @@
  			}
  	     	    }
  		}
 -	    	b = (t*__ieee754_j0(x)/b);
 +		z = __ieee754_j0(x);
 +		w = __ieee754_j1(x);
 +		if (fabs(z) >= fabs(w))
 +	    		b = (t*z/b);
 +		else
 +			b = (t*w/a);		
  	    }
  	}
  	if(sgn==1) return -b; else return b;
 
 -- 
 Steve
 http://troutmask.apl.washington.edu/~kargl/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002260420.o1Q4K3SG044886>