This function extends FORTRAN's generic ACOS function to evaluate the complex arc cosine.
ACOS — Complex function value in units of radians with the real part in the first or second quadrant. (Output)
Z — Complex argument for which the arc cosine is desired. (Input)
Generic: ACOS (Z)
Specific: The specific interface names are CACOS and ZACOS.
Complex: CACOS (Z)
Double complex: The double complex function name is ZACOS.
Almost all arguments are legal. Only when |z| > b/2 can an overflow occur. Here, b = AMACH(2) is the largest floating point number. This error is not detected by ACOS.
In this example, cos−1(1 − i) is computed and printed.
USE acos_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER NOUT
COMPLEX VALUE, Z
! Compute
Z = (1.0, -1.0)
VALUE = ACOS(Z)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) Z, VALUE
99999 FORMAT (' ACOS((', F6.3, ',', F6.3, ')) = (', &
F6.3, ',', F6.3, ')')
END
ACOS(( 1.000,-1.000)) = ( 0.905, 1.061)
PHONE: 713.784.3131 FAX:713.781.9260 |