Skip to content

Truncation error on simply mean & sum function (PR#12515)

3 messages · samaya6501 at yahoo.com.tw, Christian Brechbühler, Thomas Lumley

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


I've found an instance:
[1] -2.428613e-17

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

Maybe it is due to the computer truncation error.
#
Not a bug. None of these numbers are exactly representable in binary, so 
you can't expect accuracy of better than machine epsilon.

Please don't report things that aren't bugs to r-bugs.

 	-thomas
On Fri, 8 Aug 2008, samaya6501 at yahoo.com.tw wrote:

            
Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle