stumpff_c Function

private pure function stumpff_c(z) result(c)

Stumpff function C(z)

Arguments

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

Return Value real(kind=wp)


Called by

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

Source Code

    pure function stumpff_c(z) result(c)

    implicit none

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

    if (z > zero) then
        c = (one - cos(sqrt(z))) / z
    else if (z < zero) then
        c = (cosh(sqrt(-z)) - one) / (-z)
    else
        c = 0.5_wp
    end if

    end function stumpff_c