At Sun, 24 Dec 2006 13:35:14 +0100,
Michel Van den Bergh wrote:

`
``
`I was looking at the code for gsl_sum. I have not completely
understood it yet, but I noticed that whereas levin_utrunc.c
explicitly tests for terms that are zero, this is not the case for
levin_u.c. As one divides by such terms, it seems that one may
potentially divide by zero this way. Am I wrong?

`
``
`

Hello,
Thanks for your email. I think the original code that the routine was
translated from assumes that all terms passed in are non-zero since
any others would not contribute to the sum.

`
``
`The documentation does not seem to mention that terms should be
different from zero.

`
``
`

Yes, I will add a note about that.

`
``
`I am not a numerical analyst (IANANA) but it seems to me that even in
levin_utrunc.c no motivation is given for discarding zero terms.
Wouldn't it be more natural to add a bit of noise to the remainder

`estimates to reduce the risk of division by zero?
``
``
`

Generally in GSL we just implement what is published in the
literature, so far I have not seen any newer algorithms published.

`
``
`