XL Fortran for AIX 8.1

Language Reference


Arctangent (inverse tangent) function. The result is the principal value of the nonzero complex number (X, Y) formed by the real arguments Y and X.

must be of type real.

must be of the same type and kind type parameter as Y. If Y has the value zero, X must not have the value zero.


Elemental function

Result Type and Attributes

Same as X.

Result Value


ATAN2 (1.5574077, 1.0) has the value 1.0.

Given that:

Y = |  1   1 |        X = | -1  1 |
    | -1  -1 |            | -1  1 |

the value of ATAN2(Y,X) is approximately:

ATAN2 (Y, X) = |  3&pi./4   &pi./4 |
               | -3&pi./4  -&pi./4 |

Specific Name Argument Type Result Type Pass As Arg?
ATAN2 default real default real yes
DATAN2 double precision real double precision real yes
QATAN2 (1) REAL(16) REAL(16) yes


  1. IBM Extension.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]