Chapter 2: Trigonometric and Hyperbolic Functions

ATAN

This function extends FORTRAN's generic function ATAN to evaluate the complex arc tangent.

Function Return Value

ATAN — Complex function value in units of radians with the real part in the first or fourth quadrant.   (Output)

Required Arguments

Z — Complex argument for which the arc tangent is desired.   (Input)

FORTRAN 90 Interface

Generic:                              ATAN (Z)

Specific:                             The specific interface names are CATAN and ZATAN.

FORTRAN 77 Interface

Complex:                            CATAN (Z)

Double complex:               The double complex function name is ZATAN.

Description

The argument z must not be exactly ± i, because tan1 z is undefined there. In addition, z must not be so close to ± i that substantial significance is lost.

Comments

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.

Example

In this example, tan1(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

Output

 

ATAN(( 0.010, 0.010)) = ( 0.010, 0.010)



http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260