<Example Program>
Program tanh_example Real, Dimension(2,3) :: a Complex, Dimension(3) :: c a = Reshape( [ 0.0,0.2,-0.4,0.6,-1.2,5.7 ], [ 2,3 ]) c = [ (0.2,0.0),(0.5,-1.5707963),(5.7,1.5707963) ] Print 1, Tanh(a) 1 Format(6(2X,F0.5)) Print 2, Tanh(c) 2 Format(3(2X,'(',F0.5,',',F0.5,')')) End Program
Execution Results
.00000 .19738 -.37995 .53705 -.83365 .99998 (.19738,.00000) (2.16395,-.00000) (1.00002,.00000)