From 7770fff23c3c0539d604700335a05b357c869261 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Fri, 2 Mar 2018 14:26:30 +0100 Subject: [PATCH] The Kahan summation is very handy --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2bab8c..d32df88 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,6 @@ What we have included so far: ### [kahan.hh](kahan.hh) -The [Kahan summation algorithm](https://en.wikipedia.org/wiki/Kahan_summation_algorithm) +When working with [Floating-point arithmetic](https://en.wikipedia.org/wiki/Floating-point_arithmetic) we soon realize, that addition is not necessarily [associative](https://en.wikipedia.org/wiki/Associative_property). +Whenever we need to add numbers with an ever decreasing magnitude to an sum (of the previous numbers) with an ever increasing magnitude, the [Kahan summation algorithm](https://en.wikipedia.org/wiki/Kahan_summation_algorithm) comes in handy and helps keeping the error growth small.