stumpff_s Function

private pure function stumpff_s(z) result(s)

Stumpff function S(z)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: z

Return Value real(kind=wp)


Called by

proc~~stumpff_s~~CalledByGraph proc~stumpff_s kepler_module::stumpff_s proc~d_kepds kepler_module::d_kepds proc~d_kepds->proc~stumpff_s proc~kepds kepler_module::kepds proc~kepds->proc~stumpff_s

Source Code

    pure function stumpff_s(z) result(s)

    implicit none

    real(wp),intent(in) :: z
    real(wp) :: s

    if (z > zero) then
        s = (sqrt(z) - sin(sqrt(z))) / sqrt(z)**3
    else if (z < zero) then
        s = (sinh(sqrt(-z)) - sqrt(-z)) / (-z)**(three/two)
    else
        s = one/six
    end if

    end function stumpff_s