help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a-b+b != a


From: Gordon Haverland
Subject: Re: a-b+b != a
Date: Mon, 4 Sep 2017 08:53:58 -0700

On Mon, 4 Sep 2017 16:53:29 +0200
stn021 <address@hidden> wrote:

> Is there a way to avoid this phenomenon ?

Learn about errors in floating point arithmetic?

This might be a start:
 https://en.wikipedia.org/wiki/Kahan_summation_algorithm

But in general you should not expect (a-b)+b to equal a.

Gord




reply via email to

[Prev in Thread] Current Thread [Next in Thread]