Logarithm to base 10

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.




log10(x) represents the logarithm of x to the base 10.

Mathematically, log10(x) is equivalent to log(10, x). See Example 1.

The logarithm to the base 10 is defined for all complex arguments x ≠ 0.

log10(x) rewrites logarithms to the base 10 in terms of the natural logarithm: log10(x) = ln(x)/ln(10). See Example 2.

See the ln help page for details.

Environment Interactions

When called with a floating-point argument, this function is sensitive to the environment variable DIGITS which determines the numerical working precision.


Example 1

Compute these logarithms using log10:

log10(10), log10(1000), log10(1)

Compute the same logarithms using log with 10 as the first argument:

log(10, 10), log(10, 1000), log(10, 1)

Example 2

log10 rewrites logarithms in terms of ln:

log10(x), log10(x^2 - 1)

Example 3

For floating-point values, log10 returns floating-point results:

log10(123.4), log10(5.6 + 7.8*I), log10(-15.45)

Example 4

For floating-point intervals, log10 returns results as floating-point intervals:




An arithmetical expression

Return Values

Arithmetical expression

Overloaded By


See Also

MuPAD Functions

Was this topic helpful?