52 g_xLfmt(buf, V, ndig, bufsize)
char* buf;
57 g_xLfmt(
char *buf,
void *V,
int ndig,
unsigned bufsize)
60 static FPI fpi = {64, 1 - 16383 - 64 + 1, 32766 - 16383 - 64 + 1, 1, 0};
62 ULong bits[2], *L, sign;
63 int decpt, ex, i, mode;
69 if(bufsize < (
unsigned)ndig + 10)
75 sign = L[_0] & 0x80000000L;
78 if((ex = (L[_0] >> 16) & 0x7fff) != 0)
86 b =
strcp(buf,
"NaN");
98 b =
strcp(b,
"Infinity");
104 else if(bits[0] | bits[1])
111 #ifndef IGNORE_ZERO_SIGN 135 s =
gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
136 return g__fmt(buf, s, se, decpt, sign);
char * g__fmt(char *b, char *s, const char *se, int decpt, ULong sign)
char * gdtoa(FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)
char * g_xLfmt(char *buf, void *V, int ndig, unsigned bufsize)