Re: adding order matters for accuracy ?
- From: "Bruno Luong" <b.luong@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Sep 2009 19:32:03 +0000 (UTC)
"Matt " <xys@xxxxxxxxxxxx> wrote in message <h8u0tn$g7e$1@xxxxxxxxxxxxxxxxxx>...
"Bruno Luong" <b.luong@xxxxxxxxxxxxxxxxxxxx> wrote in message <h8tuq7$qpr$1@xxxxxxxxxxxxxxxxxx>...
There's something I still don't understand here. According to my numerical analysis books, the relative error does not accumulate when you add up numbers of the same sign.
Not sure where this wrong statement you read from.
From "Introduction to Numerical Analysis" by Stoer and Bulirsch, but the idea is very simple. If the true values being summed are x(i) and have a relative error of u(i), then the computed sum S is given by,
S=sum( x.*(1+u) )
Since the true value of the sum is
S_true=sum(x)
this produces a relative error in S is
RelativeError= ( S- sum(x) )/sum(x)
= sum u.* x/sum(x)
But since all the x have the same sign the coefficients x(i)/sum(x) are a partition of unity, leading to
abs(RelativeError)<=max(abs(u))
The above is about finite precision error due to truncation (and their propagation), not error due when making the sum between two numbers that have widely different magnitudes.
The later can accumulate as various examples have showed.
Bruno
.
- Follow-Ups:
- Re: adding order matters for accuracy ?
- From: Matt
- Re: adding order matters for accuracy ?
- References:
- adding order matters for accuracy ?
- From: Ana-Maria Cuculescu
- Re: adding order matters for accuracy ?
- From: Nasser Abbasi
- Re: adding order matters for accuracy ?
- From: Ana-Maria Cuculescu
- Re: adding order matters for accuracy ?
- From: Matt Fig
- Re: adding order matters for accuracy ?
- From: Matt
- Re: adding order matters for accuracy ?
- From: Bruno Luong
- Re: adding order matters for accuracy ?
- From: Matt
- adding order matters for accuracy ?
- Prev by Date: Re: parsing a string - simple question
- Next by Date: Feature point tracking in cell biology
- Previous by thread: Re: adding order matters for accuracy ?
- Next by thread: Re: adding order matters for accuracy ?
- Index(es):
Relevant Pages
|