4 /* Fast and accurate double to string conversion based on Florian Loitsch's
8 * fp -> the double to convert, dest -> destination buffer.
9 * The generated string will never be longer than 24 characters.
10 * Make sure to pass a pointer to at least 24 bytes of memory.
11 * The emitted string will not be null terminated.
14 * The number of written characters.
18 * void print(double d)
20 * char buf[24 + 1] // plus null terminator
21 * int str_len = fpconv_dtoa(d, buf);
23 * buf[str_len] = '\0';
29 int fpconv_dtoa(double fp, char dest[24]);
33 /* [1] http://florian.loitsch.com/publications/dtoa-pldi2010.pdf */