|
fortran-bessels
Fast, accurate Bessel functions in pure modern Fortran
|
fortran-bessels is a Modern Fortran (2008+) port of Bessels.jl, built for one thing: evaluating Bessel functions as fast and as accurately as possible in pure Fortran. The fixed-order kernels beat the gfortran intrinsics by roughly 2× and the netlib specfun reference by orders of magnitude, while matching them to a few units in the last place (ULP).
Every function is an elemental real(BK) function (BK = real64), so it accepts a scalar or a whole array interchangeably — no wrapper loops, no temporaries.
The canonical build is fpm:
See the project README for the full benchmark table and the manual gfortran recipe.
bessely(nu,x), besselh, hankelh1, and hankelh2 are validated for integer order \( \nu \) only. Non-integer order has known port bugs in the variable-order Y/Hankel paths and will return incorrect values. See roadmap item 07.Still to come: real-order \( I_\nu,\; K_\nu \), spherical Bessels, and the Airy functions. See the implementation roadmap.