J3/02-228
Date: 14 July 2002
To: J3
From: Dan Nagle
Subject: Atan2 & Log
In comp.lang.fortran, James Giles complained that the specified
return values for atan2 & log were wrong. There was no subsequent
discussion on the mailing list to clarify the issue. So I
guess everybody's happy with Giles' words. The edits
below use Giles' words from his comp.lang.fortran posting.
Hopefully, if I've fouled things up, J3 will correct it
before the meeting.
Edits:
301:24-29 Replace the result value paragraph with the following:
"The result has a value equal to a processor-dependent
approximation to the principal value of the argument
of the complex number (X, Y), expressed in radians.
It lies in the range -pi <= ATAN2(Y,X) <= pi and
is equal to a processor-dependent approximation to a value
of arctan(Y/X) if X /= 0. If Y is positive, the result is positive.
If Y is negative, the result is negative. If Y = 0,
the absolute value of the result is zero if X is positive
and the absolute value of the result is pi if X is negative.
If X = 0, the absolute value of the result is pi/2."
324:13-16 Replace the result value paragraph with the following:
"The result has a value equal to a processor-dependent
approximation to LOG(X). A result of type complex is the
principal value with the real part equal to LOG(ABS(X)) and
the imaginary part equal to ATAN2(Ix, Rx), where Rx
is the real part of X and Ix is the imaginary part of X."