Go to the source code of this file.
|
char * | g_xfmt (char *buf, void *V, int ndig, unsigned bufsize) |
|
◆ g_xfmt()
char* g_xfmt |
( |
char * |
buf, |
|
|
void * |
V, |
|
|
int |
ndig, |
|
|
unsigned |
bufsize |
|
) |
| |
Definition at line 61 of file g_xfmt.c.
64 static FPI fpi = {64, 1 - 16383 - 64 + 1, 32766 - 16383 - 64 + 1, 1, 0};
68 int decpt, ex, i, mode;
76 if(bufsize < (
unsigned)ndig + 10)
84 sign = L[_0] & 0x8000;
85 bits[1] = (
ULong)(L[_1] << 16) | L[_2];
86 bits[0] = (
ULong)(L[_3] << 16) | L[_4];
87 if((ex = L[_0] & 0x7fff) != 0)
95 b =
strcp(buf,
"NaN");
107 b =
strcp(b,
"Infinity");
113 else if(bits[0] | bits[1])
121 #ifndef IGNORE_ZERO_SIGN 145 s =
gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
146 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)
References g__fmt(), gdtoa(), strcp, STRTOG_Denormal, and STRTOG_Normal.