Stumpff function C(z)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | z |
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