BDIGIT 49 bignum.c STATIC_ASSERT(sizeof_bdigit, SIZEOF_BDIGIT <= sizeof(BDIGIT)); BDIGIT 51 bignum.c STATIC_ASSERT(bdigit_signedness, 0 < (BDIGIT)-1); BDIGIT 78 bignum.c #define BIGRAD_HALF ((BDIGIT)(BIGRAD >> 1)) BDIGIT 82 bignum.c #define BIGLO(x) ((BDIGIT)((x) & BDIGMAX)) BDIGIT 83 bignum.c #define BDIGMAX ((BDIGIT)(BIGRAD-1)) BDIGIT 118 bignum.c BDIGIT *bdigitz_zero_ptr = (ptr); \ BDIGIT 146 bignum.c static BDIGIT bigdivrem_single(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT y); BDIGIT 147 bignum.c static void bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn); BDIGIT 150 bignum.c static void bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn); BDIGIT 159 bignum.c static int nlz(BDIGIT x) { return nlz_int((unsigned int)x) - (SIZEOF_INT-SIZEOF_BDIGIT) * CHAR_BIT; } BDIGIT 161 bignum.c static int nlz(BDIGIT x) { return nlz_long((unsigned long)x) - (SIZEOF_LONG-SIZEOF_BDIGIT) * CHAR_BIT; } BDIGIT 163 bignum.c static int nlz(BDIGIT x) { return nlz_long_long((unsigned LONG_LONG)x) - (SIZEOF_LONG_LONG-SIZEOF_BDIGIT) * CHAR_BIT; } BDIGIT 165 bignum.c static int nlz(BDIGIT x) { return nlz_int128((uint128_t)x) - (SIZEOF_INT128_T-SIZEOF_BDIGIT) * CHAR_BIT; } BDIGIT 360 bignum.c bary2bdigitdbl(const BDIGIT *ds, size_t n) BDIGIT 372 bignum.c bdigitdbl2bary(BDIGIT *ds, size_t n, BDIGIT_DBL num) BDIGIT 377 bignum.c ds[1] = (BDIGIT)BIGDN(num); BDIGIT 381 bignum.c bary_cmp(const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 398 bignum.c static BDIGIT BDIGIT 399 bignum.c bary_small_lshift(BDIGIT *zds, const BDIGIT *xds, size_t n, int shift) BDIGIT 414 bignum.c bary_small_rshift(BDIGIT *zds, const BDIGIT *xds, size_t n, int shift, BDIGIT higher_bdigit) BDIGIT 417 bignum.c BDIGIT x; BDIGIT 431 bignum.c bary_zero_p(BDIGIT *xds, size_t xn) BDIGIT 442 bignum.c bary_neg(BDIGIT *ds, size_t n) BDIGIT 449 bignum.c bary_2comp(BDIGIT *ds, size_t n) BDIGIT 470 bignum.c bary_swap(BDIGIT *ds, size_t num_bdigits) BDIGIT 472 bignum.c BDIGIT *p1 = ds; BDIGIT 473 bignum.c BDIGIT *p2 = ds + num_bdigits - 1; BDIGIT 475 bignum.c BDIGIT tmp = *p1; BDIGIT 588 bignum.c integer_pack_fill_dd(BDIGIT **dpp, BDIGIT **dep, BDIGIT_DBL *ddp, int *numbits_in_dd_p) BDIGIT 627 bignum.c bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords, size_t wordsize, size_t nails, int flags) BDIGIT 629 bignum.c BDIGIT *dp, *de; BDIGIT 660 bignum.c BDIGIT d; BDIGIT 726 bignum.c if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) && BDIGIT 757 bignum.c if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) && BDIGIT 758 bignum.c wordsize % SIZEOF_BDIGIT == 0 && (uintptr_t)words % ALIGNOF(BDIGIT) == 0) { BDIGIT 767 bignum.c MEMCPY(words, dp, BDIGIT, src_num_bdigits); BDIGIT 768 bignum.c BDIGITS_ZERO((BDIGIT*)words + src_num_bdigits, dst_num_bdigits - src_num_bdigits); BDIGIT 771 bignum.c MEMCPY(words, dp, BDIGIT, dst_num_bdigits); BDIGIT 784 bignum.c BDIGIT d = ((BDIGIT*)words)[i]; BDIGIT 785 bignum.c ((BDIGIT*)words)[i] = swap_bdigit(d); BDIGIT 790 bignum.c BDIGIT *p = words; BDIGIT 1050 bignum.c integer_unpack_push_bits(int data, int numbits, BDIGIT_DBL *ddp, int *numbits_in_dd_p, BDIGIT **dpp) BDIGIT 1062 bignum.c integer_unpack_single_bdigit(BDIGIT u, size_t size, int flags, BDIGIT *dp) BDIGIT 1081 bignum.c bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, size_t numwords, size_t wordsize, size_t nails, int flags, int nlp_bits) BDIGIT 1085 bignum.c BDIGIT *dp; BDIGIT 1086 bignum.c BDIGIT *de; BDIGIT 1119 bignum.c if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) && BDIGIT 1149 bignum.c if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) && BDIGIT 1155 bignum.c MEMCPY(dp, words, BDIGIT, numwords*bdigits_per_word); BDIGIT 1161 bignum.c BDIGIT *p = dp; BDIGIT 1168 bignum.c BDIGIT *p; BDIGIT 1170 bignum.c BDIGIT d = *p; BDIGIT 1240 bignum.c *dp++ = (BDIGIT)dd; BDIGIT 1281 bignum.c bary_unpack(BDIGIT *bdigits, size_t num_bdigits, const void *words, size_t numwords, size_t wordsize, size_t nails, int flags) BDIGIT 1313 bignum.c bary_subb(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, int borrow) BDIGIT 1364 bignum.c bary_sub(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 1370 bignum.c bary_sub_one(BDIGIT *zds, size_t zn) BDIGIT 1376 bignum.c bary_addc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, int carry) BDIGIT 1385 bignum.c const BDIGIT *tds; BDIGIT 1422 bignum.c bary_add(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 1428 bignum.c bary_add_one(BDIGIT *ds, size_t n) BDIGIT 1440 bignum.c bary_mul_single(BDIGIT *zds, size_t zn, BDIGIT x, BDIGIT y) BDIGIT 1452 bignum.c bary_muladd_1xN(BDIGIT *zds, size_t zn, BDIGIT x, const BDIGIT *yds, size_t yn) BDIGIT 1487 bignum.c bigdivrem_mulsub(BDIGIT *zds, size_t zn, BDIGIT x, const BDIGIT *yds, size_t yn) BDIGIT 1513 bignum.c bary_mulsub_1xN(BDIGIT *zds, size_t zn, BDIGIT x, const BDIGIT *yds, size_t yn) BDIGIT 1527 bignum.c bary_mul_normal(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 1555 bignum.c bary_sq_fast(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn) BDIGIT 1559 bignum.c BDIGIT vl; BDIGIT 1592 bignum.c zds[i + xn + 1] += (BDIGIT)c; BDIGIT 1620 bignum.c bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn, mulfunc_t *mulfunc) BDIGIT 1634 bignum.c BDIGIT *tds; BDIGIT 1649 bignum.c wds = ALLOCV_N(BDIGIT, work, wn); BDIGIT 1652 bignum.c MEMCPY(wds, zds + n, BDIGIT, xn); BDIGIT 1680 bignum.c bary_mul_karatsuba(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) BDIGIT 1691 bignum.c const BDIGIT *xds0, *xds1, *yds0, *yds1; BDIGIT 1692 bignum.c BDIGIT *zds0, *zds1, *zds2, *zds3; BDIGIT 1721 bignum.c wds = ALLOCV_N(BDIGIT, work, wn); BDIGIT 1778 bignum.c MEMCPY(wds, zds1, BDIGIT, n); BDIGIT 1795 bignum.c MEMCPY(wds, zds2, BDIGIT, n); BDIGIT 1821 bignum.c BDIGIT c = carry1 + carry3 - borrow; BDIGIT 1862 bignum.c bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) BDIGIT 1869 bignum.c size_t x0n; const BDIGIT *x0ds; BDIGIT 1870 bignum.c size_t x1n; const BDIGIT *x1ds; BDIGIT 1871 bignum.c size_t x2n; const BDIGIT *x2ds; BDIGIT 1872 bignum.c size_t y0n; const BDIGIT *y0ds; BDIGIT 1873 bignum.c size_t y1n; const BDIGIT *y1ds; BDIGIT 1874 bignum.c size_t y2n; const BDIGIT *y2ds; BDIGIT 1876 bignum.c size_t u1n; BDIGIT *u1ds; int u1p; BDIGIT 1877 bignum.c size_t u2n; BDIGIT *u2ds; int u2p; BDIGIT 1878 bignum.c size_t u3n; BDIGIT *u3ds; int u3p; BDIGIT 1880 bignum.c size_t v1n; BDIGIT *v1ds; int v1p; BDIGIT 1881 bignum.c size_t v2n; BDIGIT *v2ds; int v2p; BDIGIT 1882 bignum.c size_t v3n; BDIGIT *v3ds; int v3p; BDIGIT 1884 bignum.c size_t t0n; BDIGIT *t0ds; int t0p; BDIGIT 1885 bignum.c size_t t1n; BDIGIT *t1ds; int t1p; BDIGIT 1886 bignum.c size_t t2n; BDIGIT *t2ds; int t2p; BDIGIT 1887 bignum.c size_t t3n; BDIGIT *t3ds; int t3p; BDIGIT 1888 bignum.c size_t t4n; BDIGIT *t4ds; int t4p; BDIGIT 1890 bignum.c size_t z0n; BDIGIT *z0ds; BDIGIT 1891 bignum.c size_t z1n; BDIGIT *z1ds; int z1p; BDIGIT 1892 bignum.c size_t z2n; BDIGIT *z2ds; int z2p; BDIGIT 1893 bignum.c size_t z3n; BDIGIT *z3ds; int z3p; BDIGIT 1894 bignum.c size_t z4n; BDIGIT *z4ds; BDIGIT 1896 bignum.c size_t zzn; BDIGIT *zzds; BDIGIT 1927 bignum.c wds = ALLOCV_N(BDIGIT, work, wn); BDIGIT 2220 bignum.c MEMCPY(zzds, z0ds, BDIGIT, z0n); BDIGIT 2222 bignum.c MEMCPY(zzds + 4*n, z4ds, BDIGIT, z4n); BDIGIT 2238 bignum.c MEMCPY(zds, zzds, BDIGIT, zzn); BDIGIT 2260 bignum.c bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2262 bignum.c const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT; BDIGIT 2271 bignum.c mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds); BDIGIT 2276 bignum.c mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds); BDIGIT 2279 bignum.c mpz_export(zds, &count, -1, sizeof(BDIGIT), 0, nails, z); BDIGIT 2299 bignum.c bary_short_mul(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2314 bignum.c bary_sparse_p(const BDIGIT *ds, size_t n) BDIGIT 2326 bignum.c bary_mul_precheck(BDIGIT **zdsp, size_t *znp, const BDIGIT **xdsp, size_t *xnp, const BDIGIT **ydsp, size_t *ynp) BDIGIT 2330 bignum.c BDIGIT *zds = *zdsp; BDIGIT 2332 bignum.c const BDIGIT *xds = *xdsp; BDIGIT 2334 bignum.c const BDIGIT *yds = *ydsp; BDIGIT 2381 bignum.c const BDIGIT *tds; BDIGIT 2395 bignum.c MEMCPY(zds, yds, BDIGIT, yn); BDIGIT 2424 bignum.c bary_mul_karatsuba_branch(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) BDIGIT 2454 bignum.c bary_mul_karatsuba_start(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) BDIGIT 2463 bignum.c bary_mul_toom3_branch(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) BDIGIT 2479 bignum.c bary_mul_toom3_start(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) BDIGIT 2488 bignum.c bary_mul(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2520 bignum.c BDIGIT *yds, *zds; BDIGIT 2530 bignum.c BDIGIT *yds = bds->yds, *zds = bds->zds; BDIGIT 2532 bignum.c BDIGIT q; BDIGIT 2540 bignum.c else q = (BDIGIT)((BIGUP(zds[zn-1]) + zds[zn-2])/yds[yn-1]); BDIGIT 2566 bignum.c static BDIGIT BDIGIT 2567 bignum.c bigdivrem_single1(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT x_higher_bdigit, BDIGIT y) BDIGIT 2572 bignum.c BDIGIT r; BDIGIT 2584 bignum.c qds[i] = (BDIGIT)(t2 / y); BDIGIT 2587 bignum.c return (BDIGIT)t2; BDIGIT 2591 bignum.c static BDIGIT BDIGIT 2592 bignum.c bigdivrem_single(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT y) BDIGIT 2598 bignum.c bigdivrem_restoring(BDIGIT *zds, size_t zn, BDIGIT *yds, size_t yn) BDIGIT 2610 bignum.c BDIGIT r; BDIGIT 2637 bignum.c bary_divmod_normal(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2640 bignum.c BDIGIT *zds, *yyds; BDIGIT 2655 bignum.c yyds = ALLOCV_N(BDIGIT, tmpyz, yn+zn); BDIGIT 2659 bignum.c yyds = alloc_y ? ALLOCV_N(BDIGIT, tmpyz, yn) : rds; BDIGIT 2660 bignum.c zds = alloc_z ? ALLOCV_N(BDIGIT, tmpyz, zn) : qds; BDIGIT 2669 bignum.c zds = ALLOCV_N(BDIGIT, tmpyz, zn); BDIGIT 2670 bignum.c MEMCPY(zds, xds, BDIGIT, xn); BDIGIT 2674 bignum.c yyds = (BDIGIT *)yds; BDIGIT 2683 bignum.c MEMCPY(rds, zds, BDIGIT, yn); BDIGIT 2689 bignum.c MEMMOVE(qds, zds+yn, BDIGIT, j); BDIGIT 2701 bignum.c BDIGIT *xds = BDIGITS(x), *yds = BDIGITS(y), *qds, *rds; BDIGIT 2733 bignum.c bary_divmod_gmp(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2735 bignum.c const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT; BDIGIT 2749 bignum.c mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds); BDIGIT 2750 bignum.c mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds); BDIGIT 2766 bignum.c mpz_export(qds, &count, -1, sizeof(BDIGIT), 0, nails, q); BDIGIT 2772 bignum.c mpz_export(rds, &count, -1, sizeof(BDIGIT), 0, nails, r); BDIGIT 2782 bignum.c BDIGIT *xds = BDIGITS(x), *yds = BDIGITS(y), *qds, *rds; BDIGIT 2814 bignum.c bary_divmod_branch(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2826 bignum.c bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn) BDIGIT 2843 bignum.c MEMCPY(rds, xds, BDIGIT, xn); BDIGIT 2848 bignum.c MEMCPY(qds, xds, BDIGIT, xn); BDIGIT 2940 bignum.c BDIGIT *ds; BDIGIT 2943 bignum.c ds = ALLOC_N(BDIGIT, len); BDIGIT 2944 bignum.c MEMCPY(ds, RBIGNUM(big)->as.ary, BDIGIT, BIGNUM_EMBED_LEN_MAX); BDIGIT 2957 bignum.c MEMCPY(RBIGNUM(big)->as.ary, ds, BDIGIT, len); BDIGIT 2963 bignum.c RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len); BDIGIT 2966 bignum.c REALLOC_N(RBIGNUM(big)->as.heap.digits, BDIGIT, len); BDIGIT 2990 bignum.c RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len); BDIGIT 3009 bignum.c MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, len); BDIGIT 3025 bignum.c BDIGIT *ds = BDIGITS(x); BDIGIT 3038 bignum.c static BDIGIT BDIGIT 3043 bignum.c BDIGIT *ds = BDIGITS(x); BDIGIT 3044 bignum.c BDIGIT hibits = 0; BDIGIT 3050 bignum.c MEMCPY(BDIGITS(z), ds, BDIGIT, n); BDIGIT 3072 bignum.c BDIGIT *ds = BDIGITS(x); BDIGIT 3086 bignum.c BDIGIT *ds = BDIGITS(x); BDIGIT 3090 bignum.c BDIGIT u; BDIGIT 3146 bignum.c BDIGIT *digits = BDIGITS(big); BDIGIT 3233 bignum.c BDIGIT *dp; BDIGIT 3234 bignum.c BDIGIT *de; BDIGIT 3235 bignum.c BDIGIT fixbuf[bdigit_roomof(sizeof(long))]; BDIGIT 3294 bignum.c static const BDIGIT char_bit[1] = { CHAR_BIT }; BDIGIT 3295 bignum.c BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))]; BDIGIT 3296 bignum.c BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)]; BDIGIT 3297 bignum.c BDIGIT nlz_bits_in_msbyte_bary[1]; BDIGIT 3298 bignum.c BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))]; BDIGIT 3299 bignum.c BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS]; BDIGIT 3300 bignum.c BDIGIT mod_bary[numberof(word_numbits_bary)]; BDIGIT 3301 bignum.c BDIGIT one[1] = { 1 }; BDIGIT 3432 bignum.c BDIGIT *dp; BDIGIT 3433 bignum.c BDIGIT *de; BDIGIT 3434 bignum.c BDIGIT fixbuf[bdigit_roomof(sizeof(long))]; BDIGIT 3435 bignum.c BDIGIT d; BDIGIT 3534 bignum.c BDIGIT *ds; BDIGIT 3536 bignum.c BDIGIT fixbuf[bdigit_roomof(sizeof(long))]; BDIGIT 3623 bignum.c BDIGIT *ds; BDIGIT 3624 bignum.c BDIGIT fixbuf[2] = { 0, 0 }; BDIGIT 3657 bignum.c MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits); BDIGIT 3675 bignum.c MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits); BDIGIT 3773 bignum.c BDIGIT *dp; BDIGIT 3815 bignum.c BDIGIT *zds; BDIGIT 3863 bignum.c BDIGIT *uds, *vds, *tds; BDIGIT 3874 bignum.c uds = ALLOCV_N(BDIGIT, tmpuv, 2*num_bdigits); BDIGIT 3894 bignum.c uds[i++] = (BDIGIT)BIGDN(dd); BDIGIT 3914 bignum.c MEMCPY(vds+i, uds+i, BDIGIT, num_bdigits-i); BDIGIT 3925 bignum.c MEMCPY(BDIGITS(z), uds, BDIGIT, num_bdigits); BDIGIT 3943 bignum.c const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT; BDIGIT 3949 bignum.c BDIGIT *zds; BDIGIT 3966 bignum.c mpz_export(BDIGITS(z), &count, -1, sizeof(BDIGIT), 0, nails, mz); BDIGIT 4395 bignum.c BDIGIT *digits = BDIGITS(big); BDIGIT 4455 bignum.c BDIGIT *digits = BDIGITS(big); BDIGIT 4504 bignum.c BDIGIT *xds, *zds; BDIGIT 4525 bignum.c BDIGIT hibitsx; BDIGIT 4680 bignum.c big2str_2bdigits(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t taillen) BDIGIT 4719 bignum.c big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn, BDIGIT 4726 bignum.c const BDIGIT *bds; BDIGIT 4791 bignum.c BDIGIT *qds, *rds; BDIGIT 4793 bignum.c BDIGIT *tds; BDIGIT 4809 bignum.c tds = (BDIGIT *)bds; BDIGIT 4881 bignum.c BDIGIT *xds; BDIGIT 4937 bignum.c BDIGIT *wds; BDIGIT 4940 bignum.c wds = ALLOCV_N(BDIGIT, tmpw, xn + wn); BDIGIT 4941 bignum.c MEMCPY(wds, xds, BDIGIT, xn); BDIGIT 4965 bignum.c const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT; BDIGIT 4969 bignum.c BDIGIT *xds = BDIGITS(x); BDIGIT 4973 bignum.c mpz_import(mx, xn, -1, sizeof(BDIGIT), 0, nails, xds); BDIGIT 5005 bignum.c BDIGIT *xds; BDIGIT 5053 bignum.c BDIGIT *ds; BDIGIT 5115 bignum.c BDIGIT *ds = BDIGITS(x); BDIGIT 5174 bignum.c BDIGIT c; BDIGIT 5175 bignum.c BDIGIT *digits; BDIGIT 5194 bignum.c c = (BDIGIT)u; BDIGIT 5213 bignum.c BDIGIT *ds = BDIGITS(x), dl; BDIGIT 5229 bignum.c if (bits && (dl & ((BDIGIT)1 << (bits %= BITSPERDIG)))) { BDIGIT 5239 bignum.c dl = BIGLO(dl + ((BDIGIT)1 << bits)); BDIGIT 5476 bignum.c if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) != 0) return Qfalse; BDIGIT 5486 bignum.c if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) != 0) return Qfalse; BDIGIT 5504 bignum.c BDIGIT *ds = BDIGITS(z); BDIGIT 5530 bignum.c BDIGIT *xds, *yds, *zds; BDIGIT 5557 bignum.c BDIGIT *xds, *zds; BDIGIT 5582 bignum.c zds[0] = (BDIGIT)-num; BDIGIT 5654 bignum.c BDIGIT *xds, *zds; BDIGIT 5823 bignum.c BDIGIT *xds, *zds; BDIGIT 5854 bignum.c BDIGIT *xds, *yds, *zds; BDIGIT 5899 bignum.c BDIGIT *xds, *yds, *zds; BDIGIT 5900 bignum.c BDIGIT dd; BDIGIT 5903 bignum.c BDIGIT *qds, *rds; BDIGIT 6230 bignum.c bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y) BDIGIT 6233 bignum.c BDIGIT *xds, *zds; BDIGIT 6236 bignum.c BDIGIT hibitsy; BDIGIT 6288 bignum.c BDIGIT *ds1, *ds2, *zds; BDIGIT 6290 bignum.c BDIGIT hibitsx, hibitsy; BDIGIT 6291 bignum.c BDIGIT hibits1, hibits2; BDIGIT 6293 bignum.c BDIGIT tmph; BDIGIT 6336 bignum.c bigor_int(VALUE x, long xn, BDIGIT hibitsx, long y) BDIGIT 6339 bignum.c BDIGIT *xds, *zds; BDIGIT 6342 bignum.c BDIGIT hibitsy; BDIGIT 6407 bignum.c BDIGIT *ds1, *ds2, *zds; BDIGIT 6409 bignum.c BDIGIT hibitsx, hibitsy; BDIGIT 6410 bignum.c BDIGIT hibits1, hibits2; BDIGIT 6412 bignum.c BDIGIT tmph; BDIGIT 6455 bignum.c bigxor_int(VALUE x, long xn, BDIGIT hibitsx, long y) BDIGIT 6458 bignum.c BDIGIT *xds, *zds; BDIGIT 6461 bignum.c BDIGIT hibitsy; BDIGIT 6501 bignum.c BDIGIT *ds1, *ds2, *zds; BDIGIT 6503 bignum.c BDIGIT hibitsx, hibitsy; BDIGIT 6504 bignum.c BDIGIT hibits1, hibits2; BDIGIT 6506 bignum.c BDIGIT tmph; BDIGIT 6608 bignum.c BDIGIT *xds; BDIGIT 6612 bignum.c BDIGIT bit; BDIGIT 6635 bignum.c bit = (BDIGIT)1 << s2; BDIGIT 6655 bignum.c hash = rb_memhash(BDIGITS(x), sizeof(BDIGIT)*BIGNUM_LEN(x)) ^ BIGNUM_SIGN(x); BDIGIT 6714 bignum.c static const BDIGIT char_bit[1] = { CHAR_BIT }; BDIGIT 6715 bignum.c BDIGIT numbytes_bary[bdigit_roomof(sizeof(size_t))]; BDIGIT 6716 bignum.c BDIGIT nlz_bary[1]; BDIGIT 6717 bignum.c BDIGIT result_bary[bdigit_roomof(sizeof(size_t)+1)]; BDIGIT 6745 bignum.c return rb_integer_unpack(result_bary, numberof(result_bary), sizeof(BDIGIT), 0, BDIGIT 7739 compile.c BDIGIT digits[1]; BDIGIT 7989 compile.c BDIGIT *d = BIGNUM_DIGITS(obj); BDIGIT 7992 compile.c IBF_WP(d, BDIGIT, len); BDIGIT 8 ext/-test-/bignum/bigzero.c MEMZERO(BIGNUM_DIGITS(z), BDIGIT, len); BDIGIT 17 ext/-test-/bignum/bigzero.c MEMZERO(BIGNUM_DIGITS(z), BDIGIT, len); BDIGIT 153 ext/bigdecimal/bigdecimal.c static void VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v); BDIGIT 175 ext/bigdecimal/bigdecimal.c return (sizeof(*pv) + pv->MaxPrec * sizeof(BDIGIT)); BDIGIT 376 ext/bigdecimal/bigdecimal.c hash ^= rb_memhash(p->frac, sizeof(BDIGIT)*p->Prec); BDIGIT 620 ext/bigdecimal/bigdecimal.c #define VpAllocReal(prec) (Real *)VpMemAlloc(offsetof(Real, frac) + (prec) * sizeof(BDIGIT)) BDIGIT 621 ext/bigdecimal/bigdecimal.c #define VpReallocReal(ptr, prec) (Real *)VpMemRealloc((ptr), offsetof(Real, frac) + (prec) * sizeof(BDIGIT)) BDIGIT 634 ext/bigdecimal/bigdecimal.c MEMCPY(pv->frac, x->frac, BDIGIT, pv->MaxPrec); BDIGIT 1302 ext/bigdecimal/bigdecimal.c VpInternalRound(c, 0, c->frac[c->Prec-1], (BDIGIT)(VpBaseVal() * (BDIGIT_DBL)res->frac[0] / div->frac[0])); BDIGIT 3392 ext/bigdecimal/bigdecimal.c static BDIGIT VpAddAbs(Real *a,Real *b,Real *c); BDIGIT 3393 ext/bigdecimal/bigdecimal.c static BDIGIT VpSubAbs(Real *a,Real *b,Real *c); BDIGIT 3394 ext/bigdecimal/bigdecimal.c static size_t VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, BDIGIT *av, BDIGIT *bv); BDIGIT 3817 ext/bigdecimal/bigdecimal.c VpInit(BDIGIT BaseVal) BDIGIT 4080 ext/bigdecimal/bigdecimal.c memcpy(c->frac, a->frac, n * sizeof(BDIGIT)); BDIGIT 4111 ext/bigdecimal/bigdecimal.c BDIGIT mrv; BDIGIT 4239 ext/bigdecimal/bigdecimal.c static BDIGIT BDIGIT 4249 ext/bigdecimal/bigdecimal.c BDIGIT av, bv, carry, mrv; BDIGIT 4334 ext/bigdecimal/bigdecimal.c static BDIGIT BDIGIT 4344 ext/bigdecimal/bigdecimal.c BDIGIT av, bv, borrow, mrv; BDIGIT 4451 ext/bigdecimal/bigdecimal.c VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, BDIGIT *av, BDIGIT *bv) BDIGIT 4566 ext/bigdecimal/bigdecimal.c BDIGIT carry; BDIGIT 4621 ext/bigdecimal/bigdecimal.c memset(c->frac, 0, (nc + 1) * sizeof(BDIGIT)); /* Initialize c */ BDIGIT 4642 ext/bigdecimal/bigdecimal.c carry = (BDIGIT)(s / BASE); BDIGIT 4644 ext/bigdecimal/bigdecimal.c c->frac[ind_c] += (BDIGIT)s; BDIGIT 4647 ext/bigdecimal/bigdecimal.c carry += (BDIGIT)s; BDIGIT 4648 ext/bigdecimal/bigdecimal.c c->frac[ind_c] -= (BDIGIT)(s * BASE); BDIGIT 4696 ext/bigdecimal/bigdecimal.c BDIGIT borrow, borrow1, borrow2; BDIGIT 4807 ext/bigdecimal/bigdecimal.c c->frac[ind_c] += (BDIGIT)q; BDIGIT 4815 ext/bigdecimal/bigdecimal.c c->frac[ind_c + 1] += (BDIGIT)q; BDIGIT 4828 ext/bigdecimal/bigdecimal.c borrow1 = (BDIGIT)(qb / BASE); BDIGIT 4832 ext/bigdecimal/bigdecimal.c r->frac[ind_r] += (BDIGIT)(BASE - qb); BDIGIT 4836 ext/bigdecimal/bigdecimal.c r->frac[ind_r] -= (BDIGIT)qb; BDIGIT 4921 ext/bigdecimal/bigdecimal.c memmove(&a->frac[0], &a->frac[i], a->Prec*sizeof(BDIGIT)); BDIGIT 5044 ext/bigdecimal/bigdecimal.c BDIGIT m, e, nn; BDIGIT 5277 ext/bigdecimal/bigdecimal.c BDIGIT shift, m, e, nn; BDIGIT 5325 ext/bigdecimal/bigdecimal.c BDIGIT m, e, nn; BDIGIT 5400 ext/bigdecimal/bigdecimal.c memset(a->frac, 0, ma * sizeof(BDIGIT)); BDIGIT 5615 ext/bigdecimal/bigdecimal.c BDIGIT i; BDIGIT 5650 ext/bigdecimal/bigdecimal.c memset(m->frac, 0, mm * sizeof(BDIGIT)); BDIGIT 5653 ext/bigdecimal/bigdecimal.c i = (BDIGIT)val; BDIGIT 5663 ext/bigdecimal/bigdecimal.c (BDIGIT)(val*(double)BASE)); BDIGIT 5863 ext/bigdecimal/bigdecimal.c BDIGIT v, shifter; BDIGIT 5864 ext/bigdecimal/bigdecimal.c BDIGIT div; BDIGIT 5943 ext/bigdecimal/bigdecimal.c memset(y->frac + ix + 1, 0, (y->Prec - (ix + 1)) * sizeof(BDIGIT)); BDIGIT 6023 ext/bigdecimal/bigdecimal.c BDIGIT v; BDIGIT 6054 ext/bigdecimal/bigdecimal.c VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v) BDIGIT 6104 ext/bigdecimal/bigdecimal.c BDIGIT carry; BDIGIT 108 ext/bigdecimal/bigdecimal.h # define RMPD_BASE ((BDIGIT)100000000000000000000000000000000000000U) BDIGIT 111 ext/bigdecimal/bigdecimal.h # define RMPD_BASE ((BDIGIT)10000000000000000000U) BDIGIT 114 ext/bigdecimal/bigdecimal.h # define RMPD_BASE ((BDIGIT)1000000000U) BDIGIT 117 ext/bigdecimal/bigdecimal.h # define RMPD_BASE ((BDIGIT)10000U) BDIGIT 120 ext/bigdecimal/bigdecimal.h # define RMPD_BASE ((BDIGIT)100U) BDIGIT 202 ext/bigdecimal/bigdecimal.h BDIGIT frac[FLEXIBLE_ARRAY_SIZE]; /* Array of fraction part. */ BDIGIT 216 ext/bigdecimal/bigdecimal.h static inline BDIGIT BDIGIT 247 ext/bigdecimal/bigdecimal.h VP_EXPORT size_t VpInit(BDIGIT BaseVal); BDIGIT 3204 gc.c size += BIGNUM_LEN(obj) * sizeof(BDIGIT); BDIGIT 424 internal.h #ifndef BDIGIT BDIGIT 492 internal.h BDIGIT *digits; BDIGIT 494 internal.h BDIGIT ary[BIGNUM_EMBED_LEN_MAX]; BDIGIT 39 marshal.c shortlen(size_t len, BDIGIT *ds) BDIGIT 41 marshal.c BDIGIT num; BDIGIT 802 marshal.c BDIGIT *d = BIGNUM_DIGITS(obj); BDIGIT 813 marshal.c BDIGIT num = *d; BDIGIT 275 rational.c const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT; BDIGIT 284 rational.c mpz_import(mx, BIGNUM_LEN(x), -1, sizeof(BDIGIT), 0, nails, BIGNUM_DIGITS(x)); BDIGIT 285 rational.c mpz_import(my, BIGNUM_LEN(y), -1, sizeof(BDIGIT), 0, nails, BIGNUM_DIGITS(y)); BDIGIT 291 rational.c mpz_export(BIGNUM_DIGITS(z), &count, -1, sizeof(BDIGIT), 0, nails, mz);