

The Wikipedia page about atan2 (and some of the references cited there) give me
the impression that there is no truly *standard* way of implementing the
function.
"The realization of the function differs from one computer language to another."
Hmm, that doesn't sound good.
"The C function atan2, and most other computer implementations, are designed
to...always define atan2(0, 0). On implementations without signed zero, or when
given positive zero arguments, it is normally defined as 0. It will always
return a value...rather than raising an error or returning a NaN (Not a
Number)."
However...
"For systems implementing signed zero, infinities, or Not a Number (for example,
IEEE floating point)...these *may* return NaN or raise an exception when given a
NaN argument."
Then it gets more complex with such stuff as real vs. imaginaryand/orcomplex
numbers, "undefined" vs. "indeterminate" values, "signed 0" vs. "unsigned 0",
the two arguments sometimes being reversed, etc.
Various programs and computer languages handle the atan2(0,0) problem in
different ways and with different outcomes(!)
Much of this stuff is way over my head, as I am a NaM
(NotaMathematician :P ),
but the overall situation is surprising to me. And some of the explanations
border on the realm of mathematical 'philosophy'.
Post a reply to this message

