Returns the log base 10 of n.



Argument Description
n The input value.

Returns: Real


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.


logval = log10(num);

The above code gets the log10 of the value stored in "num".

Back: Real Number Functions
Next: logn
© Copyright YoYo Games Ltd. 2015 All Rights Reserved