How to use 'log_sum_exp' function to deal with a negative value

I think it is always useful to work on the log scale, no? From a purely numerical point of view? At any rate an example of where this could be useful is when computing something like

\begin{equation*} f(t \mid 0, 1, w) = \pi\sum_{k=1}^\infty k \exp \left(\frac{-k^2\pi^2t}{2}\right)\sin(k\pi w), \end{equation*}

as in Navarro & Fuss, 2009 and this thread here.

1 Like