title: Convert double/float to string
body: <p>I need to convert a floating point number to an equivalent string in decimal (or other base). Conversion at first needs to be done in the format <code>xE+0</code> where <code>x</code> is the floating point number.</p>
  
  <p>The idea I have is to first truncate the floating point number into a temporary integer and then convert that integer into string, and then consider the fractional part, multiply it with <code>10</code> while the fractional part does not become <code>0</code>. After the fractional part is transferred into the left side of the decimal point, apply the integer to string function again and convert the fraction part to string. Is there a better way, which will be faster than this? Will this method induce any kind of side effects?</p>
  
  <p>To convert the floating point number into exponential representation shall I do the same as above and then adjust the power? Or directly bitmask the <a href="https://en.wikipedia.org/wiki/IEEE_754" rel="noreferrer">IEEE&nbsp;754</a> floating point representation and convert each part into string.</p>
  
  <p><em>Note: No other functions could be used, because I have access to absolutely no library functions. This code goes into a toy kernel.</em></p>