Lines Matching refs:BcBigDig
297 if (bc_num_pow10[i] > (BcBigDig) n->num[idx]) places += 1; in bc_num_negPow10()
319 assert(((BcBigDig) BC_BASE_POW) * 2 == ((BcDig) BC_BASE_POW) * 2); in bc_num_addDigits()
413 bc_num_mulArray(const BcNum* restrict a, BcBigDig b, BcNum* restrict c) in bc_num_mulArray()
416 BcBigDig carry = 0; in bc_num_mulArray()
430 BcBigDig in = ((BcBigDig) a->num[i]) * b + carry; in bc_num_mulArray()
460 bc_num_divArray(const BcNum* restrict a, BcBigDig b, BcNum* restrict c, in bc_num_divArray()
461 BcBigDig* rem) in bc_num_divArray()
464 BcBigDig carry = 0; in bc_num_divArray()
471 BcBigDig in = ((BcBigDig) a->num[i]) + carry * BC_BASE_POW; in bc_num_divArray()
782 bc_num_shift(BcNum* restrict n, BcBigDig dig) in bc_num_shift()
785 BcBigDig carry = 0, pow; in bc_num_shift()
798 BcBigDig in, temp; in bc_num_shift()
799 in = ((BcBigDig) ptr[i]); in bc_num_shift()
818 BcBigDig dig; in bc_num_shiftLeft()
844 dig = (BcBigDig) (places % BC_BASE_DIGS); in bc_num_shiftLeft()
909 BcBigDig dig; in bc_num_shiftRight()
924 dig = (BcBigDig) (places % BC_BASE_DIGS); in bc_num_shiftRight()
1022 static BcBigDig
1250 BcBigDig sum = 0, carry = 0; in bc_num_m_simp()
1281 sum += ((BcBigDig) ptr_a[j]) * ((BcBigDig) ptr_b[k]); in bc_num_m_simp()
1283 if (sum >= ((BcBigDig) BC_BASE_POW) * BC_BASE_POW) in bc_num_m_simp()
1515 BcBigDig dig; in bc_num_m()
1520 dig = (BcBigDig) a->num[0]; in bc_num_m()
1525 dig = (BcBigDig) b->num[0]; in bc_num_m()
1671 bc_num_divExtend(BcNum* restrict a, BcNum* restrict b, BcBigDig divisor) in bc_num_divExtend()
1695 BcBigDig divisor; in bc_num_d_long()
1734 divisor = (BcBigDig) b->num[len - 1]; in bc_num_d_long()
1767 divisor = (BcBigDig) b->num[reallen - 1]; in bc_num_d_long()
1808 BcBigDig result; in bc_num_d_long()
1821 BcBigDig n1, dividend, quotient; in bc_num_d_long()
1825 n1 = (BcBigDig) n[len]; in bc_num_d_long()
1826 dividend = n1 * BC_BASE_POW + (BcBigDig) n[len - 1]; in bc_num_d_long()
1842 bc_num_mulArray(b, (BcBigDig) quotient, &cpb); in bc_num_d_long()
1904 BcBigDig rem; in bc_num_d()
1905 bc_num_divArray(a, (BcBigDig) b->num[0], c, &rem); in bc_num_d()
2099 BcBigDig exp; in bc_num_p()
2220 BcBigDig val; in bc_num_place()
2237 BcBigDig val; in bc_num_left()
2252 BcBigDig val; in bc_num_right()
2400 static BcBigDig
2424 return (BcBigDig) (uchar) c; in bc_num_parseChar()
2504 BcBigDig exp, pow; in bc_num_parseDecimal()
2509 exp = (BcBigDig) i; in bc_num_parseDecimal()
2524 BcBigDig dig; in bc_num_parseDecimal()
2536 dig = ((BcBigDig) n->num[idx]) + ((BcBigDig) c) * pow; in bc_num_parseDecimal()
2572 bc_num_parseBase(BcNum* restrict n, const char* restrict val, BcBigDig base) in bc_num_parseBase()
2580 BcBigDig v; in bc_num_parseBase()
2961 bc_num_bigdig2num(&exp, (BcBigDig) places); in bc_num_printExponent()
2984 bc_num_printFixup(BcNum* restrict n, BcBigDig rem, BcBigDig pow, size_t idx) in bc_num_printFixup()
2987 BcBigDig acc; in bc_num_printFixup()
3001 acc = ((BcBigDig) a[i]) * rem + ((BcBigDig) a[i - 1]); in bc_num_printFixup()
3008 acc += (BcBigDig) a[i]; in bc_num_printFixup()
3051 bc_num_printPrepare(BcNum* restrict n, BcBigDig rem, BcBigDig pow) in bc_num_printPrepare()
3067 assert(pow == ((BcBigDig) ((BcDig) pow))); in bc_num_printPrepare()
3093 bc_num_printNum(BcNum* restrict n, BcBigDig base, size_t len, in bc_num_printNum()
3101 BcBigDig dig = 0, acc, exp; in bc_num_printNum()
3102 BcBigDig* ptr; in bc_num_printNum()
3162 bc_vec_init(&stack, sizeof(BcBigDig), BC_DTOR_NONE); in bc_num_printNum()
3218 acc = (BcBigDig) intp.num[i]; in bc_num_printNum()
3364 bc_num_printBase(BcNum* restrict n, BcBigDig base, bool newline) in bc_num_printBase()
3485 bc_num_createFromBigdig(BcNum* restrict n, BcBigDig val) in bc_num_createFromBigdig()
3535 bc_num_parse(BcNum* restrict n, const char* restrict val, BcBigDig base) in bc_num_parse()
3551 BcBigDig dig = bc_num_parseChar(val[0], BC_NUM_MAX_LBASE); in bc_num_parse()
3561 bc_num_print(BcNum* restrict n, BcBigDig base, bool newline) in bc_num_print()
3600 BcBigDig
3615 BcBigDig r = 0; in bc_num_bigdig2()
3629 r = (BcBigDig) n->num[nrdx + 2]; in bc_num_bigdig2()
3637 r = r * BC_BASE_POW + (BcBigDig) n->num[nrdx + 1]; in bc_num_bigdig2()
3645 r = r * BC_BASE_POW + (BcBigDig) n->num[nrdx]; in bc_num_bigdig2()
3652 BcBigDig
3673 bc_num_bigdig2num(BcNum* restrict n, BcBigDig val) in bc_num_bigdig2num()
3837 bc_num_bigdig2num(&conv, (BcBigDig) s2); in bc_num_createFromRNG()
3845 bc_num_bigdig2num(&conv, (BcBigDig) s1); in bc_num_createFromRNG()
3853 bc_num_bigdig2num(&conv, (BcBigDig) i2); in bc_num_createFromRNG()
3861 bc_num_bigdig2num(&conv, (BcBigDig) i1); in bc_num_createFromRNG()
4327 BcBigDig rem; in bc_num_divmod()
4329 bc_num_divArray(ptr_a, (BcBigDig) b->num[0], c, &rem); in bc_num_divmod()