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

From: Oscar Rueda Palacio <ruepalos_at_jcyl.es>
Date: Wed 13 Apr 2005 - 17:55:04 EST


Robin,

You could try

b <- complex(real=1, im=Inf)



Óscar Manuel Rueda Palacio
Viceintervención
Consejería de Hacienda
Junta de Castilla y León
Tfno: 983414092 e-mail: ruepalos@jcyl.es

-----Mensaje original-----

De: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch]En nombre de Robin Hankin Enviado el: miércoles, 13 de abril de 2005 9:51 Para: R-help@stat.math.ethz.ch
Asunto: [R] Inf +1i vs 1+Inf*1i

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Apr 13 18:10:10 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:07 EST