Compute the argument of a complex number
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=wp), | intent(in) | :: | z |
elemental function arg(z) result(v)
!! Compute the argument of a complex number
complex(wp),intent(in)::z
real(wp)::v
v = atan2(aimag(z),real(z))
end function arg