use a polyfill for Math.log10 in order not to break IE