[R] Inf +1i vs 1+Inf*1i

Robin Hankin r.hankin at soc.soton.ac.uk
Wed Apr 13 09:51:19 CEST 2005


Hi

If I have

a <- Inf + 1i

then

Re(a) is Inf, and Im(a) is 1, as expected.

But if

b <- 1 + Inf * 1i,

then

Im(b) = Inf ,  as expected,   but Re(b) = NaN, which I didn't expect.


Why this asymmetry?   How to define an object with Re(b)=1, Im(b)=Inf?


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




More information about the R-help mailing list