bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Re: gsl_sf_bessel__J_CF1 bug again


From: Brian Gough
Subject: Re: [Bug-gsl] Re: gsl_sf_bessel__J_CF1 bug again
Date: Sat, 15 Mar 2008 07:18:14 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI)

At Sun, 02 Dec 2007 06:06:11 -0800,
Koichi Takahashi wrote:
> At this range, x is still not large enough to use the asymptotic form?
> In gsl_sf_bessel_jl_e,
> 
>    else if(x > 1000.0 && x > 100.0*l*l)
>    {
>      //asymptotic
>    }
>    else
>    {
>      //CF1
>    }
> 
> so, for example, 100 * 50 * 50 = 250,000.
> For l=50, the iteration starts to exceed 10,000 around x=9900.
> If we want to stick to 10,000 max iteration, we have to switch to
> the asymptotic version with something like x > 3*l*l.  Maybe this is
> too small?   If so I'd consider increasing the max iteration.
> Maybe we should do both.  Or there can be a better method.

I've modified the asymptotic method to compute to higher precision and
changed gsl_sf_bessel_jl to use it for x > l*l (rather than x >
100*l*l).  This fixes the test cases you sent.

http://git.savannah.gnu.org/gitweb/?p=gsl.git;a=commit;h=f2c8297ac8957f1791cb9ed52a581b6b78b0e7d2

Thanks for the bug report.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]