adding #include <limits> to log_sum_exp