From tlumley at u.washington.edu  Wed Aug 17 01:06:48 2005
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Tue, 16 Aug 2005 16:06:48 -0700 (PDT)
Subject: [Rd] bug? (PR#8074)
In-Reply-To: <20050816221230.4027D18B97@slim.kubism.ku.dk>
References: <20050816221230.4027D18B97@slim.kubism.ku.dk>
Message-ID: <Pine.A41.4.61b.0508161605490.213406@homer08.u.washington.edu>

On Wed, 17 Aug 2005 pmosquin at hotmail.com wrote:
> I just don't understand this:
>
>> (2*2)==4
> [1] TRUE
>> .2*.2
> [1] 0.04
>> (.2*.2)==.04
> [1] FALSE

It's a FAQ, not a bug. Consider:

> (.2*.2) - .04
[1] 6.938894e-18

and read the FAQ

 	-thomas


> or
>
>> x=.04
>> x
> [1] 0.04
>> y=.2*.2
>> y
> [1] 0.04
>> y==x
> [1] FALSE
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



[Rd] bug? (PR#8074)
Thomas Lumley