Revamped smart rounding to use 'signif' instead of if statements