[R] BUG: atan(1i) / 5 = NaN+Infi ?

Jonathan Dushoff du@ho|| @end|ng |rom mcm@@ter@c@
Fri Sep 13 14:53:55 CEST 2024


> Message: 4
> Date: Thu, 12 Sep 2024 11:21:02 -0400
> From: Duncan Murdoch <murdoch.duncan using gmail.com>
> That's not the correct formula, is it?  I think the result should be x *
> Conj(y) / Mod(y)^2 .

Correct, sorry. And thanks.

> So that would involve <double> * <complex> and
> <complex> / <double>, not just real arithmetic.

Not an expert, but I don't see it. Conj and Mod seem to be numerically
straightforward real-like operations. We do those, and then multiply
one complex number by one real quotient.



More information about the R-help mailing list