Re: [Rd] Truncation error on simply mean & sum function (PR#12515

From: Christian Brechbühler <brechbuehler_at_gmail.com>
Date: Fri, 08 Aug 2008 09:26:43 -0400

On Fri, Aug 8, 2008 at 7:30 AM, <samaya6501_at_yahoo.com.tw> wrote:

> 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.<https://stat.ethz.ch/mailman/listinfo/r-devel>

This is not a bug, but FAQ 7.31.
/Christian

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 08 Aug 2008 - 13:34:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Aug 2008 - 13:36:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive