char *gcvt(double value, int ndigit,
The gcvt() function converts a floating-point number
to a string. It converts value to a null-terminated string
(similar to that of the %g format of printf())
in the array pointed to by buf and returns buf.
It produces ndigit significant digits (limited to an unspecified
value determined by the precision of a double) in %f if possible,
or %e (scientific notation) otherwise. A minus sign is included
in the returned string if value is less than 0. A radix character is included
in the returned string if value is not a whole number.
Trailing zeros are suppressed where value is not a whole number.
The radix character is determined by the current locale.
Is the floating point number to be formatted.
Is the number of significant digits.
Points to the array that is to hold the formatted data.
The gcvt() function always returns buf.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- ecvt(), fcvt(), printf()
PTC MKS Toolkit 10.3 Documentation Build 39.