[R] Is this correct?

From: Joe <cjosephlu_at_gmail.com>
Date: Tue 11 Oct 2005 - 15:42:13 EST


Dear userR,

With the following results, are they correct or acceptable?

> x <- c(1.4, 1.2, 2.8)
> sum(x)

[1] 5.4
> sum(x) == 5.4

[1] FALSE
> (1.4 + 1.2 + 2.8) - 5.4

[1] -8.881784e-16

> (1.4 + 1.2) - 2.6
[1] -4.440892e-16
> 2.6 - 1.5 - 1.1
[1] 0

> version

         _
platform i386-pc-mingw32

arch     i386
os       mingw32

system i386, mingw32
status
major 2
minor 2.0
year 2005
month 10
day 06
svn rev 35749
language R

What can I do to correct them if they are not correct? Thanks!

--
C. Joseph Lu
Department of Statistics
National Cheng-Kung University
Tainan, Taiwan, ROC

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Oct 11 15:47:35 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:41 EST