[J3] More Bessel functions

Steven G. Kargl kargl at uw.edu
Wed Jan 20 02:26:00 UTC 2021


On Tue, Jan 19, 2021 at 02:49:59PM -0800, Van Snyder via J3 wrote:
> On Tue, 2021-01-19 at 12:28 -0700, Ondřej Čertík via J3 wrote:
> > On Tue, Jan 19, 2021, at 12:11 PM, Steven G. Kargl via J3 wrote:
> > > On Tue, Jan 19, 2021 at 10:45:22AM -0800, Van Snyder via J3 wrote:
> > > > On Tue, 2021-01-19 at 16:38 +0000, Nathan Sircombe via J3 wrote:
> > > > > 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
> > > > > animplementation.
> > > > 
> > > > There are more things in heaven and earth, Horatio, than are
> > > > dreamt ofin your philosophy.There are more sources of freely-
> > > > available reliable mathematicalsoftware than libm.
> > > 
> > > Isn't your second sentence an argument against adding these
> > > functions to the Fortran standard?
> > > As Bill points out, Abramowitz and Stegun is a rather thickbook on
> > > special functions.  It is now updated and availablefor free at 
> > > https://dlmf.nist.gov.  The NIST site contains linksto software,
> > > e.g., https://dlmf.nist.gov/10.77.  Should theFortran standard
> > > include all of the functions covered by NIST?
> 
> The advantage of standards is they are, well, standard.
> One can find software for just about any special function. Typically
> several routines, with different interfaces.

I think that this is slippery slope.

I suspect that solving linear algebra problems far out
paces the need for BESSEL_I0(x), etc.  Should the Standard
include standardized interfaces for some, many, or all of
the BLAS and LAPACK routines?  Perhaps, the Standard should
include an intrinsic module named ISO_MATRIX that encapsulates
BLAS and LAPACK interfaces.

I also suspect forward and inverse FFTs far out pace
the need for BESSEL_I0(x).  Again, should the Standard
include standardized interfaces and an ISO_FOURIER intrinsic
module?  Should it only include radix-2 FFTs?  I would
advocate for Clive Temperton's prime factor FFT algorithms.

> A competent vendor will provide a good one, perhaps by picking up one
> in the public domain, and adjusting the name and argument list to meet
> the standard.

True.  One can find Sun Microsystem's libm implementation
on Netlib.  fdlibm contains an implementation of jn(x) 
(Copyright date of 1993), i.e., BESSEL_JN(X), which is the 
basis of most (all?) open-source operating systems' libm.
It only took 17 years for someone to find an serious bug
in that implementation (countable many inf almost evenly
spaced over the domain of x).  

-- 
Steve


More information about the J3 mailing list