From samaya6501 at yahoo.com.tw  Fri Aug  8 13:30:04 2008
From: samaya6501 at yahoo.com.tw (samaya6501 at yahoo.com.tw)
Date: Fri,  8 Aug 2008 13:30:04 +0200 (CEST)
Subject: [Rd] Truncation error on simply mean & sum function (PR#12515)
Message-ID: <20080808113004.3B2FA282EFC2@mail.pubhealth.ku.dk>

Full_Name: Tom Wang
Version: 2.6.2
OS: Linux, Windows
Submission from: (NULL) (61.230.6.228)


I've found an instance:

> a <- c(0.187,-0.019,0.074,-0.06,0.221,-0.079,0.12,0.079,-0.281,-0.242)
> sum(a)
[1] -2.428613e-17

The actual sum is 0 but it reports the wrong answer.

Maybe it is due to the computer truncation error.



[Rd] Truncation error on simply mean & sum function (PR#12515)
samaya6501 at yahoo.com.tw