1GCVT(3) Linux Programmer's Manual GCVT(3)
2
3
4
6 gcvt - convert a floating-point number to a string
7
9 #include <stdlib.h>
10
11 char *gcvt(double number, size_t ndigit, char *buf);
12
14 The gcvt() function converts number to a minimal length NULL terminated
15 ASCII string and stores the result in buf. It produces ndigit signifi‐
16 cant digits in either printf(3) F format or E format.
17
19 This function is obsolete. Instead, sprintf() is recommended.
20
22 The gcvt() function returns the address of the string pointed to by
23 buf.
24
26 marked as LEGACY in POSIX.1-2001.
27
29 ecvt(3), fcvt(3), sprintf(3)
30
31
32
33 1993-03-29 GCVT(3)