The problem is that neither 0.55 nor 2.55 are exact machine numbers (the 
computer uses binary representation), so it may happen that the machine 
representation of 0.55 is slightly less than 0.55 while the machine 
representation of 2.55 is slightly above 2.55.


--- On Fri, 11/7/08, Korn, Ed (NIH/NCI) [E] <[EMAIL PROTECTED]> wrote:

> From: Korn, Ed (NIH/NCI) [E] <[EMAIL PROTECTED]>
> Subject: [R] rounding
> To: [EMAIL PROTECTED]
> Received: Friday, 11 July, 2008, 6:07 AM
> Hi,
>  
> Round(0.55,1)=0.5
>  
> Round(2.55,1)=2.6
>  
> Can this be right?
>  
> Thanks,
>  
> Ed
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to