|
|
1.1 ! root 1: .TH ECVT 3 ! 2: .CT 2 data_man ! 3: .SH NAME ! 4: ecvt, fcvt, gcvt \- convert numbers to ascii ! 5: .SH SYNOPSIS ! 6: .nf ! 7: .B char *ecvt(value, ndigit, decpt, sign) ! 8: .B double value; ! 9: .B int ndigit, *decpt, *sign; ! 10: .PP ! 11: .B char *fcvt(value, ndigit, decpt, sign) ! 12: .B double value; ! 13: .B int ndigit, *decpt, *sign; ! 14: .PP ! 15: .B char *gcvt(value, ndigit, buf) ! 16: .B double value; ! 17: .B char *buf; ! 18: .fi ! 19: .SH DESCRIPTION ! 20: .I Ecvt ! 21: converts the ! 22: .I value ! 23: to a null-terminated string of ! 24: .I ndigit ! 25: ASCII digits ! 26: and returns a pointer thereto. ! 27: The position of the decimal point relative to the ! 28: beginning of the string is stored indirectly ! 29: through ! 30: .IR decpt "" ! 31: (negative means to the left of the ! 32: returned digits). ! 33: If the sign of the result is negative, ! 34: the word pointed to by ! 35: .IR sign "" ! 36: is non-zero, otherwise ! 37: it is zero. ! 38: The low-order digit is rounded. ! 39: .PP ! 40: .I Fcvt ! 41: is similar to ! 42: .I ecvt ! 43: and produces output for the Fortran format ! 44: .BI F*. ndigit . ! 45: If ! 46: .IR decpt \(<=\- ndigit , ! 47: then the returned string is null. ! 48: Otherwise, ! 49: .IR decpt + ndigit +1 ! 50: characters (including terminating null) are returned. ! 51: .PP ! 52: .I Gcvt ! 53: converts the ! 54: .I value ! 55: to a null-terminated ASCII string in ! 56: .I buf ! 57: and returns a pointer to ! 58: .I buf. ! 59: It attempts to produce ! 60: .I ndigit ! 61: significant digits in Fortran F format if ! 62: possible, otherwise E format, ready for ! 63: printing. ! 64: Trailing zeros may be suppressed. ! 65: .SH "SEE ALSO" ! 66: .IR printf (3) ! 67: .SH BUGS ! 68: The return values point to static data ! 69: 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.