# char* dtostre

char* dtostre(double __val, char *__s, unsigned char __prec, unsigned char __flags)

The dtostre() function converts the double value passed in val into an ASCII representation that will be stored under s. The caller is responsible for providing sufficient storage in s.

Conversion is done in the format "[-]d.ddde±dd" where there is one digit before the decimal-point character and the number of digits after it is equal to the precision prec; if the precision is zero, no decimal-point character appears. If flags has the DTOSTRE_UPPERCASE bit set, the letter 'E' (rather than 'e' ) will be used to introduce the exponent. The exponent always contains two digits; if the value is zero, the exponent is "00".

If flags has the DTOSTRE_ALWAYS_SIGN bit set, a space character will be placed into the leading position for positive numbers.

If flags has the DTOSTRE_PLUS_SIGN bit set, a plus sign will be used instead of a space character in this case.

The dtostre() function returns the pointer to the converted string s.