modified_bessel_j1 Function

public elemental function modified_bessel_j1(x) result(j1)

Small wrapper around bessel_j1 to provide our definition (j1 = bessel_j1(x)/x).

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: x

Return Value real


Contents

Source Code


Source Code

  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