Go to the source code of this file.
|
char * | g_Qfmt (char *buf, void *V, int ndig, unsigned bufsize) |
|
◆ g_Qfmt()
char* g_Qfmt |
( |
char * |
buf, |
|
|
void * |
V, |
|
|
int |
ndig, |
|
|
unsigned |
bufsize |
|
) |
| |
Definition at line 59 of file g_Qfmt.c.
62 static FPI fpi = {113, 1 - 16383 - 113 + 1, 32766 - 16383 - 113 + 1, 1, 0};
64 ULong bits[4], *L, sign;
65 int decpt, ex, i, mode;
73 if(bufsize < (
unsigned)ndig + 10)
81 sign = L[_0] & 0x80000000L;
82 bits[3] = L[_0] & 0xffff;
87 if((ex = (L[_0] & 0x7fff0000L) >> 16) != 0)
92 if(bits[0] | bits[1] | bits[2] | bits[3])
107 b =
strcp(b,
"Infinity");
114 else if(bits[0] | bits[1] | bits[2] | bits[3])
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.