Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: adding order matters for accuracy ?
Date: Thu, 17 Sep 2009 19:47:18 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 17
Message-ID: <h8u3o6$qsv$1@fred.mathworks.com>
References: <h8mqh5$pgb$1@fred.mathworks.com> <JRCrm.36321$JG1.20628@newsfe24.iad> <h8pflj$qaf$1@fred.mathworks.com> <h8piqr$gnu$1@fred.mathworks.com> <h8ttfl$sl6$1@fred.mathworks.com> <h8tuq7$qpr$1@fred.mathworks.com> <h8u1s7$kvb$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1253216838 27551 172.30.248.38 (17 Sep 2009 19:47:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 17 Sep 2009 19:47:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:571185

"Matt Fig" <spamanon@yahoo.com> wrote in message <h8u1s7$kvb$1@fred.mathworks.com>...

> 
> 
> I am not sure about that Bruno.  sum(a) has no error because eps is smaller than eps(2) by definition.  

When it depends how each of us respectively define "error". But if you insist, here is another example:

a=[2 repmat(3*eps,1,100)]

s1 = sum(a)
s2 = sum(fliplr(a))
(s1-s2)/eps % <-100

% happy?

% Bruno