181 static char integral_part[
MAX_INT];
188 integral_part[0] =
'0';
189 integral_part[1] =
'\0';
190 fraction_part[0] =
'0';
191 fraction_part[1] =
'\0';
192 return integral_part;
196 if ((sign = number) < 0.) {
205 integral_part[0] =
'0';
208 for ( i = 0; i < digits && number != 0.; ++i) {
212 integral_part[i] = (ch <= 9) ? ch +
'0' : ch +
'a' - 10;
213 if (! isxdigit(integral_part[i]))
221 for (i = 0; i < digits; ++i)
222 integral_part[i] =
'9';
226 integral_part[i++] =
'-';
228 integral_part[i] =
'\0';
231 for ( i--, j = 0; j < i; j++, i--)
232 SWAP_INT(integral_part[i], integral_part[j]);
236 fraction_part[i] = (int)((fp +
PRECISION)*10. +
'0');
237 if (! isdigit(fraction_part[i]))
239 fp = (fp*10.0) - (
double)(long)((fp +
PRECISION)*10.);
241 fraction_part[i] =
'\0';
243 if (fract != (
char **)0)
244 *fract = fraction_part;
246 return integral_part;