A translation of part of SLATEC to C++, enough to compute Bessel functions of complex arguments
|
|
2 years ago | |
|---|---|---|
| f2c | 2 years ago | |
| fortran | 3 years ago | |
| test | 3 years ago | |
| COPYING | 8 years ago | |
| Makefile | 3 years ago | |
| README.md | 3 years ago |
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.