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$>
References: <h8mqh5$pgb$> <JRCrm.36321$JG1.20628@newsfe24.iad> <h8pflj$qaf$> <h8piqr$gnu$> <h8ttfl$sl6$> <h8tuq7$qpr$> <h8u1s7$kvb$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1253216838 27551 (17 Sep 2009 19:47:18 GMT)
NNTP-Posting-Date: Thu, 17 Sep 2009 19:47:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:571185

"Matt Fig" <> wrote in message <h8u1s7$kvb$>...

> 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