A translation of part of SLATEC to C++, enough to compute Bessel functions of complex arguments
lloda 86d3d0794b Fixes for gcc 13.1 | 1 год назад | |
---|---|---|
f2c | 1 год назад | |
fortran | 3 лет назад | |
test | 3 лет назад | |
COPYING | 7 лет назад | |
Makefile | 2 лет назад | |
README.md | 2 лет назад |
This is a translation of part of SLATEC [http://www.netlib.org/slatec/], enough to compute cylindrical Bessel functions of complex arguments.
The main reason for the translation is that the original Fortran 77 routines are not thread-safe. I simply edited the f2c [http://www.netlib.org/f2c/] translation to remove mutable static data and other unsafe patterns. However, the result does not depend on f2c anymore. I hacked away the dependence so that I could call the library with const-correct arguments.
I include both the original Fortran source and the translation, and a test that runs against both. The Fortran version fails the threaded test, which is expected. The prototypes in slatec/f2c/slatec.hpp
can be used with either the Fortran or the C++ version of the library. Other than adding const
in places, I have not changed the interfaces in any way. All the exports are extern "C"
.
Bear in mind that:
d1mach i1mach dlamch
are not exported. The are available (with value arguments) in the header slatec/f2c/mach.hpp
.To run the tests, just run make
.
This code is in the public domain.