fix bug in getDecimalPlaces

getDecimalPlaces fail when argument is exponential number (var a = 1e-8)