Format a double to fixed decimal length

Obviously the floating point data types are approximate. The original poster didn’t say anything about needing exact results.