<ATAN2 Example Program>
Program atan2_example
Real, Dimension(2,3) :: a, b, c
a = Reshape( [ 0.0,0.5,-0.8,1.6,-2.8,2.8 ], [ 2,3 ])
Print 1, a
b = Sin(a)
Print 1, b
c = Cos(a)
Print 1, c
Print 1, Atan2(b,c)
1 Format(6(2X,F8.5))
End Program
■ Execution Results
0.00000 0.50000 -0.80000 1.60000 -2.80000 2.80000 0.00000 0.47943 -0.71736 0.99957 -0.33499 0.33499 1.00000 0.87758 0.69671 -0.02920 -0.94222 -0.94222 0.00000 0.50000 -0.80000 1.60000 -2.80000 2.80000