3

I am interested in "war stories" like this one:

  1. I wrote a program involving the sum of floating point numbers but I did not use the Kahan summation.

  2. The sum was bad_sum and the program gave me a wrong result.

  3. A colleague of mine, more versed than me in numerical analysis, had a look at the code and suggested me to use the Kahan summation, the sum is now good_sum and the program gives me the correct result.

I am interested in real-life production-code, not in code samples "artificially" created in order to explain the Kahan summation algorithm.

In particular what was the relative error (bad_sum-good_sum)/good_sum for your application?

Up to now I have no similar story to tell. Maybe I will make some tests (running my program on an input data set, logging the program results and the sums with and without Kahan, estimate the relative error).

Facundo Casco
  • 10,065
  • 8
  • 42
  • 63
Alessandro Jacopson
  • 18,047
  • 15
  • 98
  • 153
  • I would really appreciate comments from the downvoters in order to improve the question. – Alessandro Jacopson Mar 31 '12 at 17:31
  • 6
    I didn't downvote, but I think that this question just isn't a good fit for SO. It's too vague for there to be a "correct" answer. You might have better luck on programmers.stackexchange. – templatetypedef Mar 31 '12 at 17:37

0 Answers0