tadayoshi funaba wrote:
> you wrote:
>> p a*a      # => Complex(Infinity, Infinity), expected: Complex(Infinity, 0.0)
> 
> i tested some implementations.
> 
>                 gosh: +inf.0+inf.0i
>                guile: +inf.0+inf.0i
>              larceny: +inf.0+inf.0i
>             mzscheme: +inf.0+inf.0i
>              ypsilon: +inf.0+inf.0i
>               gambit: +inf.0+inf.0i
>                  gcc: +inf+inf
>              python3: (inf+infj)
>                perl5: inf+infi
>                  ghc: Infinity :+ Infinity
>                 hugs: inf :+ inf
>               octave: Inf + Infi
>               squeak: Infinity + Infinity
> 
> your opinion seems to be very very minority.

You are right, my fault. while it _is_ Complex(Infinity, Infinity), it 
would have an arg of 0.0, though. :-)

> and i've never seen arg(0) return NaN.

That”Ēs pure math. I think folks hate to see NaNs (and the associated 
traps or exceptions in some languages) in trivial examples like that, 
but NaN would be correct. Still, most people set it to some reasonable 
value like 0.0 by convention, but not by math.

In any case, Complex.polar(0.0, NaN) must return Complex(0.0, 0.0) 
instead of Complex(NaN, NaN).

Thanks,
 Matthias