Write string representation of a double to a buffer. Added code from Chibi Scheme to print a ".0" if the double is a whole number (EG: 3.0) to avoid confusion in the output (EG: was "3").