fix #570: getDecimalPlaces throws error

This should fix the problems with exponents in decimal numbers as described in #570.