logsumexp function

logsumexp(v)