[J3] More Bessel functions
Nathan Sircombe
Nathan.Sircombe at arm.com
Tue Jan 19 16:38:48 UTC 2021
They’re not implemented in libm as far as I can tell - https://www.gnu.org/software/libc/manual/html_node/Special-Functions.html
…so you don’t get them ‘for free’, although GSL has an implementation.
Cheers,
Nathan.
From: J3 <j3-bounces at mailman.j3-fortran.org>
Date: Tuesday, 19 January 2021 at 15:44
To: General J3 interest list <j3 at mailman.j3-fortran.org>
Cc: Bill Long <longb at cray.com>
Subject: Re: [J3] More Bessel functions
> 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
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210119/e66fa3f9/attachment-0001.htm>
More information about the J3
mailing list