title: Algorithm to convert an IEEE 754 double to a string?
body: <p>Many programming languages that use IEEE 754 doubles provide a library function to convert those doubles to strings.  For example, C has <code>sprintf</code>, C++ has <code>stringstream</code>, Java has <code>Double.toString</code>, etc.</p>
  
  <p>Internally, how are these functions implemented?  That is, what algorithm(s) are they using to convert the double into a string representation, given that they are often subject to programmer-chosen precision limitations?</p>
  
  <p>Thanks!</p>