J3/06-114r2
Date: 16 Feb 2006
Subject: ATAN with two arguments works like ATAN2
From: /jor/Stan Whitlock
References: J3-026
Revised Suggested edits (cf 06-114)
[294:27] After "ATAN(X)" add "or ATAN(Y,X)"
[298:16+15] After "ATAN" in the first column in the table in 13.6,
insert "(X)".
[305:28] After "ATAN(X)" add " or ATAN(Y,X)"
[305:31-34] Change to read:
Arguments.
Y shall be of type real.
X If Y is present, X shall be of type real with the same kind
type parameter as Y. If Y has the value zero, X shall not
have the value zero.
If Y is absent, X shall be of type real or complex.
Result characteristics. Same as X.
Result value. If Y is present, the result is the same as the result of
ATAN2(Y,X).
If Y is absent and X is real, the result is real, is expressed
in radians, and has a value equal to a processor-dependent
approximation to arctan(X) that lies in the range
$-\frac\pi2 \leq$ ATAN(X) $\leq \frac\pi2$.
If Y is absent and X is complex, the result is complex. The
real part is expressed in radians and lies in
the range
$-\frac\pi2 \leq$ REAL(ATAN(X)) $\leq \frac\pi2$.
Note 1 to editor: please add a note on page xiii:
xx) The ATAN intrinsic is extended so that ATAN (Y, X) is ATAN2 (y,X).
Note 2 to editor: these edits assume that paper 05-204r2 has passed.
If 05-204r2 is withdrawn, the text in "Arguments."
X If Y is present, X shall be of type real with the same kind
type parameter as Y. If Y has the value zero, X shall not
have the value zero.
If Y is absent, X shall be of type real or complex.
becomes
X shall be of type real. If Y is present, X shall have the
same kind type parameter as Y. If Y has the value zero, X
shall not have the value zero.
and the text in "Result value."
If Y is absent and X is real, the result is real, is expressed
in radians, and has a value equal to a processor-dependent
approximation to arctan(X) that lies in the range
$-\frac\pi2 \leq$ ATAN(X) $\leq \frac\pi2$.
If Y is absent and X is complex, the result is complex. The
real part is expressed in radians and lies in
the range
$-\frac\pi2 \leq$ REAL(ATAN(X)) $\leq \frac\pi2$.
becomes
If Y is absent, the result is real, is expressed
in radians, and has a value equal to a processor-dependent
approximation to arctan(X) that lies in the range
$-\frac\pi2 \leq$ ATAN(X) $\leq \frac\pi2$.
Note to text users: "$-\frac\pi2 \leq$ ATAN(X) $\leq \frac\pi2$" is
fancy way of saying "-pi/2 <= ATAN(X) <= pi/2".