Re: [Rd] two bessel function bugs for nu<0

2007-06-22 Thread Martin Maechler
Thank you both, Hiroyuki and Robin, > "Robin" == Robin Hankin <[EMAIL PROTECTED]> > on Tue, 19 Jun 2007 10:25:27 +0100 writes: Robin> I can reproduce both these bugs and confirm that the suggested fix Robin> agrees with Mathematica and Maple for a few trial values. Robin

Re: [Rd] two bessel function bugs for nu<0

2007-06-19 Thread Robin Hankin
I can reproduce both these bugs and confirm that the suggested fix agrees with Mathematica and Maple for a few trial values. I can confirm that Hiroyuki's algebra is indeed consistent with AMS-55 equation 9.1.2 and the old source isn't. I'd need more time to look at equation 9.6.2. I'm not sure

[Rd] two bessel function bugs for nu<0

2007-06-18 Thread Hiroyuki Kawakatsu
#bug 1: besselI() for nu<0 and expon.scaled=TRUE #tested with R-devel (2007-06-17 r41981) x <- 2.3 nu <- -0.4 print(paste(besselI(x, nu, TRUE), "=", exp(-x)*besselI(x, nu, FALSE))) #fix: #$ diff bessel_i_old.c bessel_i_new.c #57c57 #< bessel_k(x, -alpha, expo) * ((ize == 1)? 2. : 2.*exp(-x))/M_PI