Skip to contents

Computes log(sum(exp(x))) in a numerically robust way.

Usage

log_sum(x)

Arguments

x

vector of length n

Value

log(sum(exp(x))).