Improved getSignificantDigits()