1ECVT(3)                    Library Functions Manual                    ECVT(3)
2
3
4

NAME

6       ecvt, fcvt, gcvt - output conversion
7

SYNOPSIS

9       char *ecvt(value, ndigit, decpt, sign)
10       double value;
11       int ndigit, *decpt, *sign;
12
13       char *fcvt(value, ndigit, decpt, sign)
14       double value;
15       int ndigit, *decpt, *sign;
16
17       char *gcvt(value, ndigit, buf)
18       double value;
19       char *buf;
20

DESCRIPTION

22       Ecvt  converts  the  value  to a null-terminated string of ndigit ASCII
23       digits and returns a pointer thereto.   The  position  of  the  decimal
24       point  relative  to  the  beginning  of the string is stored indirectly
25       through decpt (negative means to the left of the returned digits).   If
26       the sign of the result is negative, the word pointed to by sign is non-
27       zero, otherwise it is zero.  The low-order digit is rounded.
28
29       Fcvt is identical to ecvt, except  that  the  correct  digit  has  been
30       rounded  for  Fortran F-format output of the number of digits specified
31       by ndigits.
32
33       Gcvt converts the value to a null-terminated ASCII string  in  buf  and
34       returns  a  pointer  to buf.  It attempts to produce ndigit significant
35       digits in Fortran F format if possible, otherwise E format,  ready  for
36       printing.  Trailing zeros may be suppressed.
37

SEE ALSO

39       printf(3)
40

BUGS

42       The  return values point to static data whose content is overwritten by
43       each call.
44
45
46
477th Edition                      May 15, 1985                          ECVT(3)
Impressum