Funktion to compute log(sum(exp(x))
logSumExp(x, mean = F)
values
logical, determines whether the mean should be used