DPQ (version 0.3-3)

log1mexp: Compute f(a) = \(\mathrm{log}\)(1 - \(\mathrm{exp}\)(-a)) Numerically Optimally

Description

Compute f(a) = log(1 - exp(-a)) quickly and numerically accurately.

Usage

log1mexp(x)

Arguments

x

numeric vector of positive values.

References

Martin M<U+00E4>chler (2012). Accurately Computing \(\log(1-\exp(-|a|))\); https://CRAN.R-project.org/package=Rmpfr/vignettes/log1mexp-note.pdf.

See Also

The log1mexp() function in CRAN package copula, and the corresponding vignette (in the ‘References’).