Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: BUG???: 'Sum' depends on the order of values in an array
Date: Wed, 29 Jun 2011 21:27:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 6
Message-ID: <iug5bd$q5f$1@newscl01ah.mathworks.com>
References: <iug2ad$hta$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1309382829 26799 172.30.248.45 (29 Jun 2011 21:27:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 29 Jun 2011 21:27:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:734254

"David" wrote in message <iug2ad$hta$1@newscl01ah.mathworks.com>...
> Got this peculiar problem that sum (and also prod) appears to depend on the order of the values in the array that is supposed to be summed up. .......
- - - - - - - - - - -
  You have no reason to suppose that in any computer's calculation of numbers where round off errors can occur, these will automatically give exactly the same net result for different orderings of operations.  All you can expect is that each such error is within the range expected of such errors.  This is a characteristic of all digital computing, not just matlab.

Roger Stafford