Small wrapper around bessel_j1 to provide our definition (j1 = bessel_j1(x)/x).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | x |
elemental real function modified_bessel_j1(x) result(j1)
use warning_helpers, only: is_zero
implicit none
real, intent (in) :: x
if (is_zero(x)) then
j1 = 0.5
else
j1 = bessel_j1(x) / x
end if
end function modified_bessel_j1