First to explain what is going on...

"Formatting" is the process of going from a numeric quantity to a string. In themselves double values don't have decimal places (or a base for that matter):...