log10(): Base-10 Logarithm
log10() returns the exponent of 10 needed to produce a positive input. It is natural for orders of magnitude, decibels, pH-style scales, and scientific notation.
Positive inputs only
For real results, the input must be greater than zero. log10(1000) is 3 and log10(0.1) is −1. Use pow() to reverse a base-ten exponent, or log() when natural logarithms suit the formula.
Keep units meaningful by dividing a measurement by a reference before taking a logarithm. Use abs() only when a magnitude, rather than a signed measurement, is the intended input.