math.log10()

Type Function
Library math.*
Return value Number
Revision Release 2022.3683
Keywords log10, base-10
See also math.exp()
math.pow()

Overview

Returns the base-10 logarithm of x.

Syntax

math.log10( x )
x (required)

Number. A number.

Examples

print(math.log10(10))    ----> 1
print(math.log10(1))     ----> 0
print(math.log10(0))     ----> -inf
print(math.log10(-1))    ----> nan