SPECFUN is a FORTRAN90 library which evaluates certain special functions, by William Cody and Laura Stoltz.
In particular, SPECFUN can evaluate the I, J, K and Y Bessel functions, of orders 0, 1, or arbitrary positive integer order N, or for any positive non-integer order (an unusual feature).
Routines are also available for the Gamma function, the logarithm of the Gamma function, the exponential integrals, the error function, the Psi function, and Dawson's integral.
The original, true, correct (FORTRAN77) version of SPECFUN is available through NETLIB: http://www.netlib.org/specfun/index.html".
The routines used to calculate the real exponential integral
have been slightly modified so that they have the elemental
attribute. To do this, I needed to enclose them in a module. I was
having some issues compiling the module (the compiler didn't seem
to see the r8_gamma
function and thus didn't correctly apply
name-mangling). To avoid these, I just deleted everything that I
didn't need.
************80
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=8), | intent(in) | :: | x |
************80
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=8), | intent(in) | :: | arg | |||
real(kind=8), | intent(out) | :: | result | |||
integer(kind=4), | intent(in) | :: | jint |