If you want some papers to study some refined algorithms for floating point printing. Here are some:

Ryü - Fast Float-to-String Conversion
Printing Floating-Point Numbers Accurately with Integers
How to print floating-point numbers accurately