Compute the natural logarithm plus one
Description
This computes log(1 + x)
but is more numerically stable for
x
close to zero.
Usage
<Expr>$log1p()
Value
A polars expression
Examples
#> shape: (3, 2)
#> ┌─────┬──────────┐
#> │ a ┆ log1p │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═════╪══════════╡
#> │ 1.0 ┆ 0.693147 │
#> │ 2.0 ┆ 1.098612 │
#> │ 4.0 ┆ 1.609438 │
#> └─────┴──────────┘