This function extends FORTRAN's generic function ATAN to evaluate the complex arc tangent.
ATAN — Complex function value in units of radians with the real part in the first or fourth quadrant. (Output)
Z — Complex argument for which the arc tangent is desired. (Input)
Generic: ATAN (Z)
Specific: The specific interface names are CATAN and ZATAN.
Complex: CATAN (Z)
Double complex: The double complex function name is ZATAN.
The argument z must not be exactly ± i, because tan−1 z is undefined there. In addition, z must not be so close to ± i that substantial significance is lost.
Informational error
Type Code
3 2 Result of ATAN(Z) is accurate to less than one-half precision because |Z2| is too close to −1.0.
In this example, tan−1(0.01 − 0.01i) is computed and printed.
USE ATAN_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER NOUT
COMPLEX VALUE, Z
! Compute
Z = (0.01, 0.01)
VALUE = ATAN(Z)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) Z, VALUE
99999 FORMAT (' ATAN((', F6.3, ',', F6.3, ')) = (', &
F6.3, ',', F6.3, ')')
END
ATAN(( 0.010, 0.010)) = ( 0.010, 0.010)
PHONE: 713.784.3131 FAX:713.781.9260 |