This function is similar to the log2(n) function, only that log10(n) gets the number of 10's that we need to multiply together to get n. So log10(100) returns 2, as multiplying 10 by itself gives 100, log10(1000) returns 3 as 10x10x10=1000 etc... The number does not have to be divisible by ten, however, but this will still return an appropriate value, for example if we have log10(101) we get 2.00432137... which is how many times you could divide 101 by 10.
|n||The input value.|
logval = log10(num);
The above code gets the log10 of the value stored in "num".