Some optimizations on numeric output

Some optimizations on numeric output saves 330 bytes flash.