|
|
1.1 root 1: .TH ECVT 3 "19 January 1983"
2: .SH NAME
3: ecvt, fcvt, gcvt \- output conversion
4: .SH SYNOPSIS
5: .nf
6: .B char *ecvt(value, ndigit, decpt, sign)
7: .B double value;
8: .B int ndigit, *decpt, *sign;
9: .PP
10: .B char *fcvt(value, ndigit, decpt, sign)
11: .B double value;
12: .B int ndigit, *decpt, *sign;
13: .PP
14: .B char *gcvt(value, ndigit, buf)
15: .B double value;
16: .B char *buf;
17: .fi
18: .SH DESCRIPTION
19: .I Ecvt
20: converts the
21: .I value
22: to a null-terminated string of
23: .I ndigit
24: ASCII digits and returns a pointer thereto.
25: The position of the decimal point relative to the
26: beginning of the string is stored indirectly through
27: .IR decpt ""
28: (negative means to the left of the returned digits).
29: If the sign of the result is negative, the word pointed to by
30: .IR sign ""
31: is non-zero, otherwise it is zero. The low-order digit is rounded.
32: .PP
33: .IR Fcvt " is identical to " "ecvt\fR, except that the correct digit"
34: has been rounded for Fortran F-format output of the number
35: of digits specified by
36: .IR \(*_ndigits .
37: .PP
38: .I Gcvt
39: converts the
40: .I value
41: to a null-terminated ASCII string in
42: .I buf
43: and returns a pointer to
44: .I buf.
45: It attempts to produce
46: .I ndigit
47: significant digits in Fortran F format if possible, otherwise E format,
48: ready for printing. Trailing zeros may be suppressed.
49: .SH "SEE ALSO"
50: printf(3)
51: .SH BUGS
52: The return values point to static data
53: whose content is overwritten by each call.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.