libc.info: gvcvt

Go forward to exit
Go backward to __env_lock
Go up to Stdlib
Go to the top op libc

`gvcvt', `gcvtf'--format double or float as string

*Synopsis*
     #include <stdlib.h>
     char *gcvt(double VAL, int PRECISION, char *BUF);
     char *gcvtf(float VAL, int PRECISION, char *BUF);
   *Description*
`gcvt' writes a fully formatted number as a null-terminated string in
the buffer `*BUF'.  `gdvtf' produces corresponding character
representations of `float' numbers.
   `gcvt' uses the same rules as the `printf' format
``%.PRECISIONg''--only negative values are signed (with ``-''), and
either exponential or ordinary decimal-fraction format is chosen
depending on the number of significant digits (specified by PRECISION).
*Returns*
The result is a pointer to the formatted representation of VAL (the
same as the argument BUF).
*Portability*
Neither function is ANSI C.
   Supporting OS subroutines required: `close', `fstat', `isatty',
`lseek', `read', `sbrk', `write'.