Computes the natural logarithm of 1 plus the exponential of the input, to handle large inputs.
Examples
x <- c(-1, 0, 1, 10, 100)
log1pexp(x)
#> [1] 0.3132617 0.6931472 1.3132617 10.0000454 100.0000000
Computes the natural logarithm of 1 plus the exponential of the input, to handle large inputs.
x <- c(-1, 0, 1, 10, 100)
log1pexp(x)
#> [1] 0.3132617 0.6931472 1.3132617 10.0000454 100.0000000