Date: Thu, 25 Feb 2010 21:32:49 -0800 (PST) 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: <201002260532.o1Q5WnKI030519@troutmask.apl.washington.edu> In-Reply-To: <201002260020.o1Q0K40O036894@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
A better patch: Index: src/e_jnf.c =================================================================== --- src/e_jnf.c (revision 204219) +++ src/e_jnf.c (working copy) @@ -153,6 +153,12 @@ } } b = (t*__ieee754_j0f(x)/b); + z = __ieee754_j0f(x); + w = __ieee754_j1f(x); + if (fabsf(z) >= fabsf(w)) + b = (t * z) / b; + else + b = (t * w) / a; } } if(sgn==1) return -b; else return b; Index: src/e_jn.c =================================================================== --- src/e_jn.c (revision 204219) +++ src/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?201002260532.o1Q5WnKI030519>