[J3] More Bessel functions
Bill Long
longb at cray.com
Tue Jan 19 15:43:57 UTC 2021
> On Jan 18, 2021, at 4:29 PM, Van Snyder via J3 <j3 at mailman.j3-fortran.org> wrote:
>
> Bessel functions of the first and second kind for integer orders were added in 2008.
Part of the motivation/justification then was that these were in libm and (1) Fortran should not fall behind what is available to C programmers and (2) Implementation was simple since the libm versions of the functions could be called, and new functions would not have to be written and tested. Are the new ones being proposed also included in libm? (I have a pretty fat book on special functions from my college days - the list of potential additions to the list of math functions is quite large.)
Cheers,
Bill
>
> The need for modified Bessel functions is not as common, but still exists.
>
> Ordinary Bessel functions' asymptotic behavior is ~1/sqrt(x).
>
> Modified Bessel functions' asymptotic behaviors are ~exp(x)/sqrt(x) and ~exp(-x)/sqrt(x). Therefore, like the error function, scaled versions should be provided.
>
> For 202y, I propose adding
>
> Bessel_I0 (X)
> Bessel_I1(X)
> Bessel_IN(N,X)
> Bessel_IN(N1,N2,X)
> Bessel_K0 (X)
> Bessel_K1(X)
> Bessel_KN(N,X)
> Bessel_KN(N1,N2,X)
>
> and versions with names ending with _Scaled.
>
> The "scaled" versions for the modified Bessel function of the first kind would produce exp(-x) Bessel_I#, and for the second kind would produce exp(x) Bessel_K#. Those products behave asymptotically as 1/sqrt(x), so overflow and underflow are avoided for much larger arguments than for the unscaled versions.
>
Bill Long longb at hpe.com
Engineer/Master , Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Hewlett Packard Enterprise/ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
More information about the J3
mailing list