From gb@stat.umu.se  Thu Jan 24 14:15:43 2002
From: gb@stat.umu.se (=?iso-8859-1?Q?G=F6ran_Brostr=F6m?=)
Date: Thu, 24 Jan 2002 15:15:43 +0100 (CET)
Subject: [Rd] Representation of floating point numbers (PR#1281)
In-Reply-To: <200201241344.OAA15893@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.33.0201241512580.5000-100000@tal.stat.umu.se>

On Thu, 24 Jan 2002 theis@statistik.uni-dortmund.de wrote:

> 
> On 24-Jan-02 Prof Brian Ripley wrote:
> > 
> > There is a function all.equal provided for this purpose: it is a misuse of
> > ==.
> 
> But there is no hint or note on the "Comparisons" help page concerning this
> problem. If it is a misuse one should be warned against it.

But there is a warning there:

Don't use == and != for tests, such as in if expressions, where you must 
get a single TRUE or FALSE. Unless you are absolutely sure that nothing 
unusual can happen, you should use the identical function instead.

And 'identical' suggests:

> identical(all.equal(x, y), TRUE)

Clever indeed!
-- 
 Gran Brostrm                      tel: +46 90 786 5223
 professor                           fax: +46 90 786 6614
 Department of Statistics            http://www.stat.umu.se/egna/gb/
 Ume University
 SE-90187 Ume, Sweden             e-mail: gb@stat.umu.se

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Representation of floating point numbers (PR#1281)
=?iso-8859-1?Q?G=F6ran_Brostr=F6m?=