What does atan2(0, 0) generate on tru64? On Jan 5, 2008, at 7:51 PM, Jarkko Hietaniemi wrote:
--- src/pmc/complex.pmc.dist 2008-01-06 00:48:21.000000000 +0200 +++ src/pmc/complex.pmc 2008-01-06 02:53:34.000000000 +0200 @@ -1180,7 +1180,10 @@ im = 0.0; RE(d) = log(sqrt(re*re + im*im)); - IM(d) = atan2(im, re); + if (re == 0.0 && im == 0.0) /* atan2(0, 0) not portable */ + IM(d) = 0.0; + else + IM(d) = atan2(im, re); return d; }