I found a very useful website that has a lot of information about formatting what you want to print out. There is specifically a section about formatting floating point numbers, which you should find...