Lines Matching +full:- +full:i
1 /* Extended precision arithmetic functions for long double I/O.
35 #define NBITS ((NI-4)*16)
45 /* Maximum exponent digits - base 10 */
163 * Numbers are stored in C language as arrays of 16-bit unsigned
171 * NE-1 significand words (least significant word first,
183 * to ei[NI-2] significand (NI-4 significand words,
186 * ei[NI-1] low guard word (0x8000 bit is rounding place)
205 * -1 if a < b, -2 if either a or b is a NaN.
207 * efloor( a, b, ldp ) truncate to integer, toward -infinity
215 * eneg(e) e = -e
217 * esub( a, b, c, ldp ) c = b - a
228 * eisinf( e ) 1 if e has maximum exponent (non-IEEE)
239 * ecmpm( ai, bi ) compare significands, return 1, 0, or -1
246 * enormlz(ei) left-justify the significand
254 * esubm( ai, bi ) subtract significands, bi = bi - ai
257 * The result is always normalized and rounded to NI-4 word precision
265 * Define NANS for support of Not-a-Number items; otherwise the
268 * If NaN's are supported, the output of ecmp(a,b) is -2 if
270 * may not be legitimate. Use if(ecmp(a,b) == -1) for less-than
282 * 5 Jan 84 PDP-11 assembly language version
285 * 15 May 92 80-bit long double support
331 * For Digital Equipment PDP-11 and VAX computers, certain
332 * IBM systems, and others that use numbers with a 56-bit
340 * Std 754-1985), the symbol IBMPC should be defined. These
341 * numbers have 53-bit significands. In this mode, constants
377 double i; member
408 /* This handles 64-bit long ints. */
465 register int i; in eclear() local
467 for (i = 0; i < NE; i++) in eclear()
481 register int i; in emov() local
483 for (i = 0; i < NE; i++) in emov()
503 x[NE - 1] ^= 0x8000; /* Toggle the sign bit */ in eneg()
519 if (x[NE - 1] & 0x8000) in eisneg()
533 if ((x[NE - 1] & 0x7fff) == 0x7fff) in eisinf()
545 /* Check if e-type number is not a number.
552 int i; in eisnan() local
554 if ((x[NE - 1] & 0x7fff) != 0x7fff) in eisnan()
556 /* ... and non-zero significand field. */ in eisnan()
557 for (i = 0; i < NE - 1; i++) in eisnan()
578 register int i; in einfin() local
581 for (i = 0; i < NE - 1; i++) in einfin()
586 for (i = 0; i < NE - 1; i++) in einfin()
589 if (ldp->rndprc < NBITS) in einfin()
591 if (ldp->rndprc == 113) in einfin()
593 *(x - 9) = 0; in einfin()
594 *(x - 8) = 0; in einfin()
596 if (ldp->rndprc == 64) in einfin()
598 *(x - 5) = 0; in einfin()
600 if (ldp->rndprc == 53) in einfin()
602 *(x - 4) = 0xf800; in einfin()
606 *(x - 4) = 0; in einfin()
607 *(x - 3) = 0; in einfin()
608 *(x - 2) = 0xff00; in einfin()
622 int i; in emovi() local
625 p = a + (NE - 1); /* point to last word of external number */ in emovi()
632 *q = *p--; in emovi()
635 if ((*(q - 1) & 0x7fff) == 0x7fff) in emovi()
641 for (i = 3; i < NI; i++) in emovi()
642 *q++ = *p--; in emovi()
646 for (i = 2; i < NI; i++) in emovi()
654 for (i = 0; i < NE - 1; i++) in emovi()
655 *q++ = *p--; in emovi()
668 unsigned short i; in emovo() local
671 q = b + (NE - 1); /* point to output exponent */ in emovo()
673 i = *p++; in emovo()
674 if (i) in emovo()
675 *q-- = *p++ | 0x8000; in emovo()
677 *q-- = *p++; in emovo()
679 if (*(p - 1) == 0x7fff) in emovo()
695 for (i = 0; i < NE - 1; i++) in emovo()
696 *q-- = *p++; in emovo()
706 register int i; in ecleaz() local
708 for (i = 0; i < NI; i++) in ecleaz()
717 register int i; in ecleazs() local
720 for (i = 0; i < NI - 1; i++) in ecleazs()
732 register int i; in emovz() local
734 for (i = 0; i < NI - 1; i++) in emovz()
746 int i; in eiisnan() local
750 for (i = M + 1; i < NI; i++) in eiisnan()
752 if (x[i] != 0) in eiisnan()
792 ; -1 if a < b
797 int i; in ecmpm() local
801 for (i = M; i < NI; i++) in ecmpm()
809 if (*(--a) > *(--b)) in ecmpm()
812 return (-1); in ecmpm()
824 int i; in eshdn1() local
829 for (i = M; i < NI; i++) in eshdn1()
851 int i; in eshup1() local
853 x += NI - 1; in eshup1()
856 for (i = M; i < NI; i++) in eshup1()
864 --x; in eshup1()
878 int i; in eshdn8() local
882 for (i = M; i < NI; i++) in eshdn8()
899 int i; in eshup8() local
902 x += NI - 1; in eshup8()
905 for (i = M; i < NI; i++) in eshup8()
911 --x; in eshup8()
922 int i; in eshup6() local
928 for (i = M; i < NI - 1; i++) in eshup6()
941 int i; in eshdn6() local
944 x += NI - 1; in eshdn6()
947 for (i = M; i < NI - 1; i++) in eshdn6()
948 *(--p) = *(--x); in eshdn6()
950 *(--p) = 0; in eshdn6()
962 int i; in eaddm() local
965 x += NI - 1; in eaddm()
966 y += NI - 1; in eaddm()
968 for (i = M; i < NI; i++) in eaddm()
976 --x; in eaddm()
977 --y; in eaddm()
983 ; y - x replaces y
990 int i; in esubm() local
993 x += NI - 1; in esubm()
994 y += NI - 1; in esubm()
996 for (i = M; i < NI; i++) in esubm()
998 a = (unsigned long) (*y) - (unsigned long) (*x) - carry; in esubm()
1004 --x; in esubm()
1005 --y; in esubm()
1013 /* Multiply significand of e-type number b
1014 by 16-bit quantity a, e-type result to c. */
1024 int i; in m16m() local
1027 pp = &p[NI - 2]; in m16m()
1030 ps = &b[NI - 1]; in m16m()
1032 for (i = M + 1; i < NI; i++) in m16m()
1036 --ps; in m16m()
1037 --pp; in m16m()
1038 *(pp - 1) = 0; in m16m()
1042 m = (unsigned long) aa **ps--; in m16m()
1044 *pp-- = (unsigned short) carry; in m16m()
1047 *(pp - 1) = carry >> 16; in m16m()
1050 for (i = M; i < NI; i++) in m16m()
1051 c[i] = p[i]; in m16m()
1062 int i; in edivm() local
1067 unsigned short *equot = ldp->equot; in edivm()
1073 for (i = M; i < NI; i++) in edivm()
1079 for (i = M; i < NI; i++) in edivm()
1093 if( tnum - tcheck > tdenm ) in edivm()
1101 tquot -= 1; in edivm()
1105 tquot -= 1; in edivm()
1128 equot[i] = tquot; in edivm()
1134 for (i = M; i < NI; i++) in edivm()
1141 for (i = 0; i < NI; i++) in edivm()
1142 num[i] = equot[i]; in edivm()
1156 int i; in emulm() local
1157 unsigned short *equot = ldp->equot; in emulm()
1161 for (i = M; i < NI; i++) in emulm()
1162 equot[i] = 0; in emulm()
1165 p = &a[NI - 1]; in emulm()
1166 q = &equot[NI - 1]; in emulm()
1167 for (i = M + 1; i < NI; i++) in emulm()
1171 --p; in emulm()
1175 m16m (*p--, b, pprod); in emulm()
1182 for (i = 0; i < NI; i++) in emulm()
1183 b[i] = equot[i]; in emulm()
1195 int i;
1198 for( i=0; i<NI; i++ )
1210 * This is the so-called sticky bit.
1228 int i, j; in emdnorm() local
1242 exp -= j; in emdnorm()
1255 if (exp > (long) (-NBITS - 1)) in emdnorm()
1258 i = eshift (s, j); in emdnorm()
1259 if (i) in emdnorm()
1272 if (ldp->rndprc != ldp->rlast) in emdnorm()
1274 ecleaz (ldp->rbit); in emdnorm()
1275 switch (ldp->rndprc) in emdnorm()
1279 ldp->rw = NI - 1; /* low guard word */ in emdnorm()
1280 ldp->rmsk = 0xffff; in emdnorm()
1281 ldp->rmbit = 0x8000; in emdnorm()
1282 ldp->rebit = 1; in emdnorm()
1283 ldp->re = ldp->rw - 1; in emdnorm()
1286 ldp->rw = 10; in emdnorm()
1287 ldp->rmsk = 0x7fff; in emdnorm()
1288 ldp->rmbit = 0x4000; in emdnorm()
1289 ldp->rebit = 0x8000; in emdnorm()
1290 ldp->re = ldp->rw; in emdnorm()
1293 ldp->rw = 7; in emdnorm()
1294 ldp->rmsk = 0xffff; in emdnorm()
1295 ldp->rmbit = 0x8000; in emdnorm()
1296 ldp->rebit = 1; in emdnorm()
1297 ldp->re = ldp->rw - 1; in emdnorm()
1301 ldp->rw = 6; in emdnorm()
1302 ldp->rmsk = 0xff; in emdnorm()
1303 ldp->rmbit = 0x80; in emdnorm()
1304 ldp->rebit = 0x100; in emdnorm()
1305 ldp->re = ldp->rw; in emdnorm()
1308 ldp->rw = 6; in emdnorm()
1309 ldp->rmsk = 0x7ff; in emdnorm()
1310 ldp->rmbit = 0x0400; in emdnorm()
1311 ldp->rebit = 0x800; in emdnorm()
1312 ldp->re = ldp->rw; in emdnorm()
1315 ldp->rw = 4; in emdnorm()
1316 ldp->rmsk = 0xff; in emdnorm()
1317 ldp->rmbit = 0x80; in emdnorm()
1318 ldp->rebit = 0x100; in emdnorm()
1319 ldp->re = ldp->rw; in emdnorm()
1322 ldp->rbit[ldp->re] = ldp->rebit; in emdnorm()
1323 ldp->rlast = ldp->rndprc; in emdnorm()
1332 if ((exp <= 0) && (ldp->rndprc != NBITS)) in emdnorm()
1334 if ((exp <= 0) && (ldp->rndprc != 64) && (ldp->rndprc != NBITS)) in emdnorm()
1337 lost |= s[NI - 1] & 1; in emdnorm()
1343 r = s[ldp->rw] & ldp->rmsk; in emdnorm()
1344 if (ldp->rndprc < NBITS) in emdnorm()
1346 i = ldp->rw + 1; in emdnorm()
1347 while (i < NI) in emdnorm()
1349 if (s[i]) in emdnorm()
1351 s[i] = 0; in emdnorm()
1352 ++i; in emdnorm()
1355 s[ldp->rw] &= ~ldp->rmsk; in emdnorm()
1356 if ((r & ldp->rmbit) != 0) in emdnorm()
1358 if (r == ldp->rmbit) in emdnorm()
1362 if ((s[ldp->re] & ldp->rebit) == 0) in emdnorm()
1371 eaddm (ldp->rbit, s); in emdnorm()
1375 if ((exp <= 0) && (ldp->rndprc != NBITS)) in emdnorm()
1377 if ((exp <= 0) && (ldp->rndprc != 64) && (ldp->rndprc != NBITS)) in emdnorm()
1388 s[NI - 1] = 0; in emdnorm()
1396 for (i = 2; i < NI - 1; i++) in emdnorm()
1397 s[i] = 0; in emdnorm()
1401 for (i = M + 1; i < NI - 1; i++) in emdnorm()
1402 s[i] = 0xffff; in emdnorm()
1403 s[NI - 1] = 0; in emdnorm()
1404 if ((ldp->rndprc < 64) || (ldp->rndprc == 113)) in emdnorm()
1406 s[ldp->rw] &= ~ldp->rmsk; in emdnorm()
1407 if (ldp->rndprc == 24) in emdnorm()
1429 ; esub( a, b, c, ldp ); c = b - a
1468 int i, lost, j, k; in eadd1() local
1493 lt = lta - ltb; in eadd1()
1500 lt = -lt; in eadd1()
1505 if (lt < (long) (-NBITS - 1)) in eadd1()
1513 i = ecmpm (ai, bi); in eadd1()
1514 if (i == 0) in eadd1()
1530 for (j = 1; j < NI - 1; j++) in eadd1()
1542 if (i > 0) in eadd1()
1579 int i; in ediv() local
1608 *(c + (NE - 1)) = 0x8000; in ediv()
1610 *(c + (NE - 1)) = 0; in ediv()
1626 for (i = 1; i < NI - 1; i++) in ediv()
1628 if (bi[i] != 0) in ediv()
1630 ltb -= enormlz (bi); in ediv()
1641 for (i = 1; i < NI - 1; i++) in ediv()
1643 if (ai[i] != 0) in ediv()
1645 lta -= enormlz (ai); in ediv()
1650 *(c + (NE - 1)) = 0; in ediv()
1652 *(c + (NE - 1)) = 0x8000; in ediv()
1659 i = edivm (ai, bi, ldp); in ediv()
1661 lt = ltb - lta + EXONE; in ediv()
1662 emdnorm (bi, i, 0, lt, 64, ldp); in ediv()
1685 int i, j; in emul() local
1714 *(c + (NE - 1)) = 0x8000; in emul()
1716 *(c + (NE - 1)) = 0; in emul()
1727 for (i = 1; i < NI - 1; i++) in emul()
1729 if (ai[i] != 0) in emul()
1731 lta -= enormlz (ai); in emul()
1742 for (i = 1; i < NI - 1; i++) in emul()
1744 if (bi[i] != 0) in emul()
1746 ltb -= enormlz (bi); in emul()
1758 lt = lta + ltb - (EXONE - 1); in emul()
1777 int i; in e113toe() local
1794 for (i = 0; i < 7; i++) in e113toe()
1796 if (pe[i] != 0) in e113toe()
1803 for (i = 1; i < 8; i++) in e113toe()
1805 if (pe[i] != 0) in e113toe()
1823 for (i = 0; i < 7; i++) in e113toe()
1824 *p++ = *(--e); in e113toe()
1827 for (i = 0; i < 7; i++) in e113toe()
1838 eshift (yy, -1); in e113toe()
1849 unsigned short i; in toe113() local
1871 i = *p++; in toe113()
1873 if (i) in toe113()
1878 if (i) in toe113()
1879 *q-- = *p++ | 0x8000; in toe113()
1881 *q-- = *p++; in toe113()
1887 for (i = 0; i < 7; i++) in toe113()
1890 for (i = 0; i < 7; i++) in toe113()
1891 *q-- = *p++; in toe113()
1903 int i; in e64toe() local
1908 for (i = 0; i < NE - 5; i++) in e64toe()
1911 for (i = 0; i < 5; i++) in e64toe()
1915 for (i = 0; i < 5; i++) in e64toe()
1919 p = &yy[0] + (NE - 1); in e64toe()
1920 *p-- = *e++; in e64toe()
1922 for (i = 0; i < 4; i++) in e64toe()
1923 *p-- = *e++; in e64toe()
1928 -- but only if the top significand bit is zero. */ in e64toe()
1929 if ((yy[NE - 1] & 0x7fff) == 0 && (yy[NE - 2] & 0x8000) == 0) in e64toe()
1940 p = &yy[NE - 1]; in e64toe()
1945 for (i = 0; i < 4; i++) in e64toe()
1947 if ((i != 3 && pe[i] != 0) in e64toe()
1949 || (i == 3 && pe[i] != 0x8000)) in e64toe()
1957 for (i = 2; i <= 5; i++) in e64toe()
1959 if (pe[i] != 0) in e64toe()
1976 for (i = 0; i < NE; i++) in e64toe()
1986 unsigned short i; in toe64() local
2010 i = *p++; in toe64()
2012 if (i) in toe64()
2018 if (i) in toe64()
2019 *q-- = *p++ | 0x8000; in toe64()
2021 *q-- = *p++; in toe64()
2027 for (i = 0; i < 4; i++) in toe64()
2035 *q-- = 0x8000; in toe64()
2036 *q-- = 0; in toe64()
2037 *q-- = 0; in toe64()
2043 for (i = 0; i < 4; i++) in toe64()
2044 *q-- = *p++; in toe64()
2121 r += EXONE - 01777; in e53toe()
2125 *p++ = *(--e); in e53toe()
2126 *p++ = *(--e); in e53toe()
2127 *p++ = *(--e); in e53toe()
2134 (void) eshift (yy, -5); in e53toe()
2140 yy[E] -= (unsigned short) (k - 1); in e53toe()
2176 unsigned short i; in toe53() local
2198 i = *p++; in toe53()
2199 if (i >= (unsigned int) 2047) in toe53()
2204 *(--y) = 0; in toe53()
2205 *(--y) = 0; in toe53()
2206 *(--y) = 0; in toe53()
2216 *(--y) = 0xffff; in toe53()
2217 *(--y) = 0xffff; in toe53()
2218 *(--y) = 0xffff; in toe53()
2228 if (i == 0) in toe53()
2234 i <<= 4; in toe53()
2237 i |= *p++ & (unsigned short) 0x0f; /* *p = xi[M] */ in toe53()
2238 *y |= (unsigned short) i; /* high order output already has sign bit set */ in toe53()
2240 *(--y) = *p++; in toe53()
2241 *(--y) = *p++; in toe53()
2242 *(--y) = *p; in toe53()
2317 r += EXONE - 0177; in e24toe()
2321 *p++ = *(--e); in e24toe()
2324 *p++ = *(--e); in e24toe()
2330 (void) eshift (yy, -8); in e24toe()
2336 yy[E] -= (unsigned short) (k - 1); in e24toe()
2345 unsigned short i; in toe24() local
2366 i = *p++; in toe24()
2367 if (i >= 255) in toe24()
2372 *(--y) = 0; in toe24()
2375 *(--y) = 0; in toe24()
2384 *(--y) = 0xffff; in toe24()
2387 *(--y) = 0xffff; in toe24()
2396 if (i == 0) in toe24()
2402 i <<= 7; in toe24()
2405 i |= *p++ & (unsigned short) 0x7f; /* *p = xi[M] */ in toe24()
2406 *y |= i; /* high order output already has sign bit set */ in toe24()
2408 *(--y) = *p; in toe24()
2411 *(--y) = *p; in toe24()
2427 * -1 if a < b
2428 * -2 if either a or b is a NaN.
2435 register int i; in ecmp() local
2440 return (-2); in ecmp()
2449 /* -0 equals + 0 */ in ecmp()
2450 for (i = 1; i < NI - 1; i++) in ecmp()
2452 if (ai[i] != 0) in ecmp()
2454 if (bi[i] != 0) in ecmp()
2462 return (-1); in ecmp()
2468 msign = -1; in ecmp()
2469 i = NI - 1; in ecmp()
2477 while (--i > 0); in ecmp()
2485 if (*(--p) > *(--q)) in ecmp()
2488 return (-msign); /* p is littler */ in ecmp()
2508 p = x + NI - 1; in eshift()
2512 sc = -sc; in eshift()
2517 sc -= 16; in eshift()
2524 sc -= 8; in eshift()
2531 sc -= 1; in eshift()
2539 sc -= 16; in eshift()
2545 sc -= 8; in eshift()
2551 sc -= 1; in eshift()
2616 sc -= 8; in enormlz()
2621 sc -= 1; in enormlz()
2623 if (sc < -NBITS) in enormlz()
2674 0x2de3, 0x9fde, 0xd2ce, 0x04c8, 0xa6dd, 0x0ad8,}, /* 10**-4096 */
2676 0x4925, 0x2de4, 0x3436, 0x534f, 0xceae, 0x256b,}, /* 10**-2048 */
2698 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0x3ffb,}, /* 10**-1 */
2718 {0x2de4, 0x9fde, 0xd2ce, 0x04c8, 0xa6dd, 0x0ad8,}, /* 10**-4096 */
2719 {0x4925, 0x2de4, 0x3436, 0x534f, 0xceae, 0x256b,}, /* 10**-2048 */
2730 {0xcccd, 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0x3ffb,}, /* 10**-1 */
2753 rnd.rlast = -1;
2761 etoasc (w, string, ndigs, -1, ldp);
2798 int i, k; in __ldtoa() local
2809 rnd.rlast = -1; in __ldtoa()
2828 ndigits -= 1; in __ldtoa()
2841 __int32_t expon = (e[NE - 1] & 0x7fff) - (EXONE - 1); /* exponent part */ in __ldtoa()
2870 *decpt = ldp->outexpon + 1; in __ldtoa()
2897 --s; in __ldtoa()
2904 while (*p == ' ' || *p == '-') in __ldtoa()
2911 --s; in __ldtoa()
2916 else if (ndigits > ldp->outexpon) in __ldtoa()
2919 k = ldp->outexpon; in __ldtoa()
2921 while (*(s - 1) == '0' && ((s - outbuf) > k)) in __ldtoa()
2922 *(--s) = '\0'; in __ldtoa()
2924 /* In f format, flush small off-scale values to zero. in __ldtoa()
2926 if (mode == 3 && ((ndigits + ldp->outexpon) < 0)) in __ldtoa()
2936 i = *decpt + orig_ndigits + 3; in __ldtoa()
2938 i = orig_ndigits + MAX_EXP_DIGITS + 4; in __ldtoa()
2940 outstr = __alloc_dtoa_result(i); in __ldtoa()
2948 *rve = outstr + (s - outbuf); in __ldtoa()
2970 rnd.rlast = -1; in _ldcheck()
2983 if ((e[NE - 1] & 0x7fff) == 0x7fff) in _ldcheck()
3003 int i, j, k, expon, rndsav, ndigs; in etoasc() local
3006 unsigned short *equot = ldp->equot; in etoasc()
3009 rndsav = ldp->rndprc; in etoasc()
3018 ldp->rndprc = NBITS; /* set to full precision */ in etoasc()
3020 if (y[NE - 1] & 0x8000) in etoasc()
3023 y[NE - 1] &= 0x7fff; in etoasc()
3033 if (y[NE - 1] == 0) in etoasc()
3035 for (k = 0; k < NE - 1; k++) in etoasc()
3046 if (y[NE - 1] == 0x7fff) in etoasc()
3049 sprintf (string, " -Infinity "); in etoasc()
3059 if ((y[NE - 1] != 0) && ((y[NE - 2] & 0x8000) == 0)) in etoasc()
3068 i = ecmp (eone, y); in etoasc()
3069 if (i == 0) in etoasc()
3072 if (i < 0) in etoasc()
3076 u[NE - 1] = EXONE + NBITS - 1; in etoasc()
3078 p = &etens[NTEN - 4][0]; in etoasc()
3084 for (j = 0; j < NE - 1; j++) in etoasc()
3098 u[NE - 1] += y[NE - 1] - (unsigned int) (EXONE + NBITS - 1); in etoasc()
3121 if (y[NE - 1] == 0) in etoasc()
3123 while ((y[NE - 2] & 0x8000) == 0) in etoasc()
3126 expon -= 1; in etoasc()
3132 for (i = 0; i < ndec + 1; i++) in etoasc()
3134 if ((w[NI - 1] & 0x7) != 0) in etoasc()
3147 if (u[NI - 1] != 0) in etoasc()
3149 if (eone[NE - 1] <= u[1]) in etoasc()
3152 expon -= 1; in etoasc()
3156 k = -MAXP; in etoasc()
3184 digit = equot[NI - 1]; in etoasc()
3193 digit = equot[NI - 1]; in etoasc()
3194 expon -= 1; in etoasc()
3198 *s++ = '-'; in etoasc()
3217 ndigs -= 1; in etoasc()
3241 *s++ = (char) equot[NI - 1] + '0'; in etoasc()
3243 digit = equot[NI - 1]; in etoasc()
3244 --s; in etoasc()
3255 if (ndigs < 0 || (*(s - 1 - (*(s - 1) == '.')) & 1) == 0) in etoasc()
3258 /* Round up and propagate carry-outs */ in etoasc()
3260 --s; in etoasc()
3265 /* This will print like "1E-6". */ in etoasc()
3272 --s; in etoasc()
3298 sprintf (ss, "e-%02d", -expon); in etoasc()
3303 ldp->rndprc = rndsav; in etoasc()
3304 ldp->outexpon = expon; in etoasc()
3323 ; (i.e., "scientific" notation).
3337 rnd.rlast = -1;
3387 rndsav = ldp->rndprc;
3388 ldp->rndprc = NBITS; /* Set to full precision */
3400 k = *s - '0';
3417 --sp;
3419 *sp-- = 'z';
3439 xt[NI - 2] = (unsigned short) k;
3444 /* Mark any lost non-zero digit. */
3448 nexp -= 1;
3466 case '-':
3483 case 'i':
3484 case 'I':
3506 /* check for + or - */
3507 if (*s == '-')
3509 esign = -1;
3517 exp += *s++ - '0';
3527 exp = -exp;
3535 if (exp < -4977)
3543 nexp = exp - nexp;
3554 nexp -= 1;
3562 lexp = (EXONE - 1 + NBITS) - k;
3569 * for 0 <= n <= 324 is 8.2e-20, at 10**180.
3570 * For 0 <= n <= 999, the peak relative error is 1.4e-19 at 10**947.
3571 * For 0 >= n >= -999, it is -1.55e-19 at 10**-435.
3582 nexp = -nexp;
3583 esign = -1;
3587 lexp -= tt[E];
3590 nexp -= 4096;
3600 p -= NE;
3608 lexp -= tt[E];
3616 lexp -= EXONE - 1;
3623 lexp -= EXONE - 0x3ff;
3625 lexp -= EXONE - 0177;
3628 lexp -= EXONE - 0201;
3630 ldp->rndprc = oprec;
3635 ldp->rndprc = rndsav;
3666 lenldstr += s - lstr;
3706 int e, expon, i; in efloor() local
3710 expon = (int) f[NE - 1]; in efloor()
3711 e = (expon & 0x7fff) - (EXONE - 1); in efloor()
3718 e = NBITS - e; in efloor()
3727 e -= 16; in efloor()
3736 for (i = 0; i < NE - 1; i++) in efloor()
3738 if (f[i] != y[i]) in efloor()
3754 unsigned short *equot = ldp->equot; in eiremain()
3757 ld -= enormlz (den); in eiremain()
3759 ln -= enormlz (num); in eiremain()
3773 equot[NI - 1] |= j; in eiremain()
3775 ln -= 1; in eiremain()
3832 int i, n; in enan() local
3860 for (i = 0; i < NE - 2; i++) in enan()
3864 for (i = 0; i < NE - 2; i++) in enan()
3877 for (i = 4; i < NI - 1; i++) in enan()
3881 for (i = 4; i < NI - 1; i++) in enan()
3891 for (i = 0; i < n; i++) in enan()