Math Functions

math.log10()

Compute the common logarithm of a positive number.

Formal Syntax & Structure

python syntaxpython
math.log10(x, /)

Parameters & Attributes

NameTypeDescription
xreal numberInput real value.

Return Value

float

Floating-point result; finite precision and domain restrictions apply.

Working Example

Example Snippetpython
import mathprint(math.log10(1000))
Python Reference