[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
Re: a-b+b != a,
Gordon Haverland <=
Re: a-b+b != a, James Sherman Jr., 2017/09/04
Re: a-b+b != a, Tim Pierce, 2017/09/04