Format a double to fixed decimal length

The double type has 15 to 17 significant decimal digits precision. As long as you’re aware of that limitation, it’s not an issue.