4.3BSD-UWisc/man/cat3/ecvt.3

Compare this file to the similar file:
Show the results in this format:




ECVT(3)             UNIX Programmer's Manual              ECVT(3)



NAME
     ecvt, fcvt, gcvt - output conversion

SYNOPSIS
     char *ecvt(value, ndigit, decpt, sign)
     double value;
     int ndigit, *decpt, *sign;

     char *fcvt(value, ndigit, decpt, sign)
     double value;
     int ndigit, *decpt, *sign;

     char *gcvt(value, ndigit, buf)
     double value;
     char *buf;

DESCRIPTION
     _E_c_v_t converts the _v_a_l_u_e to a null-terminated string of _n_d_i_-
     _g_i_t ASCII digits and returns a pointer thereto.  The posi-
     tion of the decimal point relative to the beginning of the
     string is stored indirectly through _d_e_c_p_t (negative means to
     the left of the returned digits).  If the sign of the result
     is negative, the word pointed to by _s_i_g_n is non-zero, other-
     wise it is zero.  The low-order digit is rounded.

     _F_c_v_t is identical to _e_c_v_t, except that the correct digit has
     been rounded for Fortran F-format output of the number of
     digits specified by _n_d_i_g_i_t_s.

     _G_c_v_t converts the _v_a_l_u_e to a null-terminated ASCII string in
     _b_u_f and returns a pointer to _b_u_f. It attempts to produce
     _n_d_i_g_i_t significant digits in Fortran F format if possible,
     otherwise E format, ready for printing.  Trailing zeros may
     be suppressed.

SEE ALSO
     printf(3)

BUGS
     The return values point to static data whose content is
     overwritten by each call.














Printed 12/27/86          May 15, 1985                          1