slatec bessel_k(n, %i*x): lack of precision for large x



On Fri, Mar 2, 2012 at 11:47 AM, Edwin Woollett <woollett at charter.net>wrote:

>
> /* this calculation also agrees with Mma, but the zbesk
>  error messages clutter up the output, and
>  show why it is desireable to have a way to
>  surpress the printing of these messages to
>  the screen! */
>

What would you want?  No messages so you have no way of knowing that
something potentially bad happened?  Signal an (annoying?) error?

>
> ------------------------------**-----
> The bottom line here is: are there better bessel function
> routines available which are reasonably accurate for large
> abs(z) args??
>
>
Don't know.  Maybe you can compute using bfloats and return a float at the
end? (But we don't have a real bfloat implementation of Bessel functions,
so you will have to use Barton's hypergeometric code to compute the Bessel
functions.)

Maybe bessel_k(v,%i*x) can be computed via
http://www.wolframalpha.com/input/?i=BesselK[v%2Cix].  (See alternate
form).  The Bessel J and Y functions don't appear to have problems with the
size of x in your tests.  But I have no idea how accurate the result would
be.

Ray