; Log10 Example ; ------------- ; Log10 returns the base-10 logarithm - the inverse of raising 10 to ; a power. Log10(1000)=3 because 10^3=1000. Print "Log10(1) = "+Log10(1) Print "Log10(10) = "+Log10(10) Print "Log10(1000) = "+Log10(1000) Print "Log10(0.01) = "+Log10(0.01) Print "" ; Handy for counting digits: Floor(Log10(n))+1 is how many digits a ; positive number has - useful for lining up a score display score=48250 digits=Floor(Log10(score))+1 Print "Score "+score+" needs Floor(Log10("+score+"))+1 = "+digits+" digits" Print "" Print "Press any key to close the example" WaitKey End