Math.ln

Math.ln

Math.ln

Function

Natural logarithm. Returns the natural logarithm of value.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
valueNumberisNonea true number.

Return value

TypeDescription
Int/FloatReturns the natural logarithm of value. An Int is returned for integer results, and a Float for non-integer or non-finite results.

Example

Notes

  • When value is less than 0, NaN is returned according to f64 rules.