From maechler at stat.math.ethz.ch  Thu Sep 21 14:50:15 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Thu, 21 Sep 2006 14:50:15 +0200
Subject: [Rd] printing of complex numbers in R-alpha
In-Reply-To: <0BAEBFBF-7FBC-4349-BDCE-30BAE955E11B@soc.soton.ac.uk>
References: <0BAEBFBF-7FBC-4349-BDCE-30BAE955E11B@soc.soton.ac.uk>
Message-ID: <17682.35463.124617.653585@stat.math.ethz.ch>

>>>>> "Robin" == Robin Hankin <r.hankin at noc.soton.ac.uk>
>>>>>     on Thu, 21 Sep 2006 08:05:24 +0100 writes:

    Robin> Hello everyone
    Robin> I am finding complex numbers to be printed oddly in R-alpha.


    >> 1e100+1e100i
    Robin> [1] 1e+100+1e+100i
    >> 1e100 + 1e44i
    Robin> [1] 1e+100+100000000000000008821361405306422640701865984i
    >> dput(1e100+1e44i)
    Robin> 1e+100+100000000000000008821361405306422640701865984i
    >> 

ouch, ouch!

    Robin> [same thing at home on a linux box]


    Robin> The first line is what I would expect, the second and third lines  
    Robin> aren't:
    Robin> I would prefer "1e100+1e44i".  Is this possible for  R-2.4.0?

It should.
It's clearly a bug --- the good news being that it's not a new
one: it already happens in 2.2.1 (e.g.)
Hence, no reason *not* to use R-beta!

Martin




[Rd] printing of complex numbers in R-alpha
Martin Maechler