4
$\begingroup$

Kahan's summation algorithm is a method to compute sums:

$$\sum x_i$$

with many terms, without significant error.

I want to do this with very large numbers, and instead of the numbers themselves, I am given their logarithms, $\log x_i$ ($x_i > 0$), and instead of the sum, I want to compute the logarithm of the sum,

$$\log \sum x_i$$

Is there a variation of Kahan's summation for this case?

$\endgroup$
3
  • $\begingroup$ Check out this related post. Also worth looking up logsumexp. $\endgroup$
    – GoHokies
    Commented Aug 4, 2016 at 17:37
  • $\begingroup$ @GoHokies I think the logexpsum trick doesn't work well if you have a single very large term and many very small terms. $\endgroup$
    – a06e
    Commented Aug 4, 2016 at 19:22
  • $\begingroup$ scicomp.stackexchange.com/q/24624/988 $\endgroup$
    – a06e
    Commented Aug 4, 2016 at 19:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.