in reply to Get logarithm of base 10
As an alternative to the techniques already mentioned, you could always use POSIX 'log10'; (assuming that's not too easy ;-).