logspace_add: Calculate log(exp(logx) + exp(logy)) in a somewhat...

View source: R/math_utils.R

logspace_addR Documentation

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

Description

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

Usage

logspace_add(logx, logy)

Arguments

logx,

logy log-scale numeric values to add

Value

log(exp(logx) + exp(logy)), but more numerically stable


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