mirror of
https://github.com/fluencelabs/musl
synced 2025-05-05 12:02:13 +00:00
these have not been heavily tested, but they should work as described in the old standards. probably broken for non-finite values...
9 lines
119 B
C
9 lines
119 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
char *gcvt(double x, int n, char *b)
|
|
{
|
|
sprintf(b, "%.*g", n, x);
|
|
return b;
|
|
}
|