lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #include <stdio.h> |
2 | #include <stdlib.h> | ||||
3 | |||||
4 | |||||
5 | #ifdef __UCLIBC_HAS_FLOATS__ | ||||
6 | #define MAX_NDIGIT 17 | ||||
7 | char *gcvt (double number, int ndigit, char *buf) | ||||
8 | { | ||||
9 | sprintf(buf, "%.*g", (ndigit > MAX_NDIGIT)? MAX_NDIGIT : ndigit, number); | ||||
10 | return buf; | ||||
11 | } | ||||
12 | #endif |