The math.log10()
function is used to calculate the base-10 logarithm of a number.
math.log10(x)
copy
Where, x
is the number whose base-10 logarithm we want to calculate.
The function returns the logarithm of x to base 10.
The math.log10()
function is a shorthand for math.log() function with 10 as the base i.e math.log(x, 10)
The function raises a ValueError
if the value of x
is negative.