46 ULong *L, bits0[4], *bits, *zx;
47 int bx, by, decpt, ex, ey, i, j, mode;
51 if(bufsize < 10 || bufsize < (
unsigned)(ndig + 8))
59 if((L[_0] & 0x7ff00000L) == 0x7ff00000L)
62 if(L[_0] & 0xfffff || L[_1])
65 return strcp(buf,
"NaN");
67 if((L[2 + _0] & 0x7ff00000) == 0x7ff00000)
69 if(L[2 + _0] & 0xfffff || L[2 + _1])
75 if((L[_0] ^ L[2 + _0]) & 0x80000000L)
84 if(L[_0] & 0x80000000L)
90 return strcp(b,
"Infinity");
92 if((L[2 + _0] & 0x7ff00000) == 0x7ff00000)
95 if(L[_0] & 0xfffff || L[_1])
103 if(dd[0] + dd[1] == 0.)
106 #ifndef IGNORE_ZERO_SIGN 107 if(L[_0] & L[2 + _0] & 0x80000000L)
118 if((L[_0] & 0x7ff00000L) < (L[2 + _0] & 0x7ff00000L))
125 z =
d2b(dd[0], &ex, &bx);
133 y =
d2b(dd[1], &ey, &by);
134 if((i = ex - ey) != 0)
148 if((L[_0] ^ L[2 + _0]) & 0x80000000L)
151 if(L[_0] & 0x80000000L)
161 if(L[_0] & 0x80000000L)
172 for(i = 0; !*zx; zx++)
190 for(i = 0; i <= j; i++)
204 if(bufsize < (
unsigned)(fpi.
nbits * .301029995664) + 10)
211 fpi.
emin = 1 - 1023 - 53 + 1;
212 fpi.
emax = 2046 - 1023 - 106 + 1;
216 s =
gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
char * g__fmt(char *b, char *s, const char *se, int decpt, ULong sign)
Bigint * lshift(Bigint *b, int k)
char * gdtoa(FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)
Bigint * diff(Bigint *a, Bigint *b)
Bigint * d2b(double d, int *e, int *bits)
void rshift(Bigint *b, int k)
Bigint * sum(Bigint *a, Bigint *b)