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