math.log() function

The math.log() function returns the natural logarithm of x.

*Output data type: Float*

  1. import "math"
  2. math.log(x: 3.14)
  3. // Returns 1.144222799920162

Parameters

x

The value used in the operation.

*Data type: Float*

Special cases

  1. math.log(x: +Inf) // Returns +Inf
  2. math.log(x: 0) // Returns -Inf
  3. math.log(x: <0) // Returns NaN
  4. math.log(x: NaN) // Returns NaN