log10
Returns the base 10 logarithm of a number.
Keyboard Maestro: LOG10
Details #
log10(x) takes exactly one argument and returns the base 10 logarithm. floor(log10(n)) + 1 is the number of digits in a whole number.
Parameters #
Takes 1 argument.
{{ log10(text) }}
Examples #
log10(1000)→
3floor(log10(n)) + 1→
5| Sample variable | Value |
|---|---|
n | 98765 |
Gotchas #
Calling it with no argument or two arguments is an error:
log10() takes 1 argument, got 2.Anything that isn't a number is an error:
log10() needs a number, got text. Numeric text such as "0.5" is accepted.Zero and negative numbers have no logarithm; the step stops with
log10() has no result for that number.