Converts its argument to a null-terminated string of ASCII digits and returns the address of the string.
#include <stdlib.h>
char *gcvt (double value, int ndigit, char
*buffer);
Function Variants
This function also has variants named _gcvt32 and _gcvt64 for
use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using
pointer-size-specific functions.
The ecvt, fcvt, and gcvt functions represent the following special values specified in the IEEE Standard for floating-point arithmetic:
| Value | Representation |
|---|---|
| Quiet NaN | NaNQ |
| Signalling NaN | NaNS |
| +Infinity | Infinity |
| - Infinity | -Infinity |
The sign associated with each of these values is stored into the sign argument. In IEEE floating-point representation, a value of 0 (zero) can be positive or negative, as set by the sign argument.
See also fcvt and ecvt in this section.
| x | The address of the buffer. |