Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real | :: | a | ||||
real | :: | b | ||||
real | :: | cos | ||||
real | :: | sin |
subroutine angle(a,b,cos,sin)
implicit double precision (a-h,o-z)
z=sqrt(a**2+b**2)
if (z==0.D0) then
cos=1.D0
sin=0.D0
else
cos=a/z
sin=b/z
a=z
b=0.D0
end if
end subroutine angle