[R] Testing ``<=" in R

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Jan 31 22:56:03 CET 2003


Maria N Kocherginsky <mkocherg at students.uiuc.edu> writes:

> Hello,
> 
> I've encountered the following:
> 
> > n_500
> > tau_.95
> > (n*(1-tau))
> [1] 25
> > (n*(1-tau))<=25
> [1] FALSE
> > (n*(1-tau))==25
> [1] FALSE
> 
> I'm using UNIX R Version 1.4.0, and also tested in out in Windows 1.6.0. Is 
> this a bug?

No. Can 1/20 be represented exactly as a binary number?

>500*(1-tau)-25
[1] 2.131628e-14


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list