Using the input you specified with the command line you specified produces the output:
which is nothing at all like the output you said this command line produced.
To get the output you said was produced, you'd need to have run something like:
except that most of the lines in your expected output seem to have a trailing space character which this command does not duplicate.
To get the output you seem to want, you need to change the "%.4f" to "%.3f" when setting OFMT.
This User Gave Thanks to Don Cragun For This Post: