implement Math.log10 in own function