spelling correction
[unix-history] / usr / src / lib / libcompat / 4.3 / ecvt.3
CommitLineData
0186153d 1.\" @(#)ecvt.3 6.1 (Berkeley) %G%
7a02e288 2.\"
0186153d 3.TH ECVT 3 ""
7a02e288
KM
4.AT 3
5.SH NAME
6ecvt, fcvt, gcvt \- output conversion
7.SH SYNOPSIS
8.nf
9.B char *ecvt(value, ndigit, decpt, sign)
10.B double value;
11.B int ndigit, *decpt, *sign;
12.PP
13.B char *fcvt(value, ndigit, decpt, sign)
14.B double value;
15.B int ndigit, *decpt, *sign;
16.PP
17.B char *gcvt(value, ndigit, buf)
18.B double value;
19.B char *buf;
20.fi
21.SH DESCRIPTION
22.I Ecvt
23converts the
24.I value
25to a null-terminated string of
26.I ndigit
26c5620c 27ASCII digits and returns a pointer thereto.
7a02e288 28The position of the decimal point relative to the
26c5620c 29beginning of the string is stored indirectly through
7a02e288 30.IR decpt ""
26c5620c
KM
31(negative means to the left of the returned digits).
32If the sign of the result is negative, the word pointed to by
7a02e288 33.IR sign ""
26c5620c 34is non-zero, otherwise it is zero. The low-order digit is rounded.
7a02e288
KM
35.PP
36.IR Fcvt " is identical to " "ecvt\fR, except that the correct digit"
37has been rounded for Fortran F-format output of the number
38of digits specified by
39.IR \(*_ndigits .
40.PP
41.I Gcvt
42converts the
43.I value
44to a null-terminated ASCII string in
45.I buf
46and returns a pointer to
47.I buf.
48It attempts to produce
49.I ndigit
26c5620c
KM
50significant digits in Fortran F format if possible, otherwise E format,
51ready for printing. Trailing zeros may be suppressed.
7a02e288
KM
52.SH "SEE ALSO"
53printf(3)
54.SH BUGS
55The return values point to static data
56whose content is overwritten by each call.