mini\Util\Math\Decimal::ln()
Method
public
Signature
public function ln(?int $scale = NULL): self
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$scale |
?int |
NULL
|
Documentation missing |
Returns
self
Documentation
Natural logarithm using Newton-Raphson on exp
Solves exp(y) = x for y using iteration: y_{n+1} = y_n + (x - exp(y_n)) / exp(y_n) = y_n - 1 + x / exp(y_n)