char *ecvt(double value, int ndigit, int *decpt, int *sign);
The ecvt() function converts a floating-point value to a
null-terminated string of ndigit digits (where
ndigit is reduced to an unspecified limit determined by the
precision of a double) and returns a pointer to the string.
The high-order digit is non-zero, unless the value is 0. The low-order
digit is rounded. The position of the radix character (decimal point)
relative to the beginning of the string is stored in the integer pointed to
by decpt (negative means to the left of the returned
digits). If value is zero, it is unspecified whether the integer
pointed to by decpt would be 0 or 1. The radix character
is not included in the returned string. If the sign of the result
is negative, the integer pointed to by sign is non-zero,
otherwise it is 0.
If the converted value is out of range or is not representable,
the contents of the returned string are unspecified.
Is the floating-point number to be converted.
Specifies the number of digits after decimal point.
Is the return pointer to the decimal point position.
Is the return pointer to sign indicator.
The ecvt() function always returns a pointer
to a null-terminated string of digits.
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
- fcvt(), gcvt()
PTC MKS Toolkit 10.3 Documentation Build 39.