Skip to content
Back to formatted view

Raw Message

Message-ID: <8a602d1491449f0492cbf446ab2d960f@soc.soton.ac.uk>
Date: 2005-04-13T09:42:04Z
From: robin hankin
Subject: Inf +1i vs 1+Inf*1i
In-Reply-To: <16988.56065.816105.169455@stat.math.ethz.ch>

On Apr 13, 2005, at 09:40 am, Martin Maechler wrote:

> Actually, the problem comes from  "Inf * 1i" (or 1i * Inf)
> and the
> 	  0 * Inf |-> NaN
> which of course is `correct' in general, but a bit undesirable
> in the rule
>
>    (a + bi) * (c + di)  =  (ac - bd) + (ad + bc)i

thanks for this Martin.

Now I see what is going on, I wouldn't describe this as "undesirable" 
because
"(1+0i) * (0 + Inf i)"  depends  on the behaviour of the infinite limit
in the second bracket compared with the zero limit in the first.

To wit, f() and g() both calculate 1*(Inf i):



 >  f <- function(n){(1+1i/sqrt(n))*(0+n*1i)}
 > g <- function(n){(1+1i/n)*(0+sqrt(n)*1i)}
 > f(1e8)
[1] -10000+1e+08i
 > g(1e8)
[1] -1e-04+10000i
 >


So perhaps it's unreasonable to expect complex arithmetic to guess what 
I want.


very best wishes

rksh



Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743