[J3] More Bessel functions
Ondřej Čertík
ondrej at certik.us
Wed Jan 20 21:39:34 UTC 2021
Hi Bill,
On Wed, Jan 20, 2021, at 1:31 PM, Bill Long via J3 wrote:
[...]
> >
> > Yes, Fortran needs a high quality implementation of all of these (and more), readily available to the user.
>
> There are professionally written libraries, like NAG, already
> available. Also LaPack for some cases. Perhaps we should argue for
> robust Fortran interfaces instead, akin to the mpi_f08 module for MPI.
Yes, exactly: we should argue and agree on a robust API to use for those, but not necessarily putting them into the standard. And that is the purpose of `stdlib` I linked to above.
>
>
> > I would argue against putting all these into the Fortran standard today.
>
> The feature list for F202X is already closed, so F202Y would be the
> soonest. Even in the longer run, something like the add-on packages
> used by C/C++/Python might be a better strategy.
Yes, add-on seems a better idea.
>
>
> > However, all these are in scope and planned for stdlib:
> >
> > https://github.com/fortran-lang/stdlib/
> >
> > And that is a great start to put all these, with a community discussed and agreed upon API, and a good (i.e., numerically accurate and fast) reference implementation (leveraging / reusing software that is already available whenever possible).
>
> “accurate" and “fast" are often conflicting goals.
Good point. For intrinsic functions, such as `sin` or `erf`, compilers typically use faster but less accurate versions when options like `-ffast-math` are specified. If the special functions are implemented in a third party library, then the library might also provide some similar option to use faster but less accurate versions if requested by the user.
Ondrej
More information about the J3
mailing list