logspace_sum: Calculate log(sum(exp(logx))) in a somewhat numerically...

View source: R/math_utils.R

logspace_sumR Documentation

Calculate log(sum(exp(logx))) in a somewhat numerically stable way.

Description

Calculate log(sum(exp(logx))) in a somewhat numerically stable way.

Usage

logspace_sum(logx)

Arguments

logx

log-scale numeric vector of values to sum

Value

log(sum(exp(logx))), but more numerically stable


reichlab/covidEnsembles documentation built on Jan. 31, 2024, 7:21 p.m.