Type Function Library math.* Return value Number Revision Release 2024.3703 Keywords log, logarithm See also math.exp()
math.pow()
Returns the natural logarithm of x
.
math.log( x )
Number. A number.
print(math.log (2.718281828459)) ----> very close to 1 print(math.log (1)) ----> 0 print(math.log (0)) ----> -inf print(math.log (-1)) ----> NaN