if self._exp <= 0 and leftdigits > -6:
    dotplace = leftdigits
elif not eng:
    dotplace = 1
elif self._int == '0':
    dotplace = (leftdigits + 1) % 3 - 1
else:
    dotplace = (leftdigits - 1) % 3 + 1
Print number in engineering format