Gets the natural logarithm (base e) of a number.
| Parameter | Description |
|---|---|
| value | A positive number. See below for special cases. |
| Return value | Description |
|---|---|
| double | The natural logarithm of the parameter. |
See exp (JavaScript) for the inverse to this method.
To get the logarithm to the base 10 of a number, multiply the return value of this method by LOG10E (JavaScript).
To get the logarithm to the base 2 of a number, multiply the return value of this method by LOG2E (JavaScript).
sessionScope.result =
Math.exp(Math.log(sessionScope.n) / 3)
sessionScope.log10 = Math.log(sessionScope.n) * Math.LOG10E
sessionScope.log2 = Math.log(sessionScope.n) * Math.LOG2E