Lines Matching defs:rdx
95 * Return the number of integer limbs in a BcNum. This is the opposite of rdx.
138 n->len = n->rdx = 0;
170 if (BC_NUM_ZERO(n)) n->rdx = 0;
173 // len must be at least as much as rdx.
174 size_t rdx = BC_NUM_RDX_VAL(n);
175 if (n->len < rdx) n->len = rdx;
239 * of scale, like bc_num_int() is the opposite of rdx.
540 // Get the rdx's and figure out the max.
584 // Grab these needed values; places_rdx is the rdx equivalent to places like
585 // rdx is to scale.
632 // Grab these needed values; places_rdx is the rdx equivalent to places like
633 // rdx is to scale.
648 // Finally, set scale and rdx.
668 // We need to ensure rdx is correct.
669 if (BC_NUM_NONZERO(n)) n->rdx = BC_NUM_NEG_VAL(n, !neg1 != !neg2);
716 * Copies a number into another, but shifts the rdx so that the result number
719 * @param r The result number with a shifted rdx, len, and num.
724 size_t rdx = BC_NUM_RDX_VAL(n);
726 r->len = n->len - rdx;
727 r->cap = n->cap - rdx;
728 r->num = n->num + rdx;
777 * ensure that the rdx point is realigned to be between limbs.
847 // Convert places to a rdx value.
858 // If the number's rdx is bigger, that's the hard case.
933 // We need to know the int length and rdx for places.
989 size_t i, rdx = BC_NUM_RDX_VAL(n);
991 if (!rdx)
1000 for (i = 0; zero && i < rdx; ++i)
1029 temp.rdx = 0;
1070 c->rdx = BC_NUM_NEG_VAL(c, BC_NUM_NEG(b) != sub);
1139 // If the rdx values of the operands do not match, the result will
1141 // elements of the operand with higher rdx value.
1185 // operand above, the actual add or subtract can be performed as if the rdx
1512 if ((a->len == 1 || b->len == 1) && !a->rdx && !b->rdx)
1534 c->rdx = BC_NUM_NEG_VAL(c, BC_NUM_NEG(a) != BC_NUM_NEG(b));
1696 size_t i, rdx;
1793 rdx = BC_NUM_RDX_VAL(c) - BC_NUM_RDX(scale);
1804 for (i = realend - 1; i < realend && i >= rdx && BC_NUM_NONZERO(a); --i)
2043 d->rdx = BC_NUM_NEG_VAL(d, BC_NUM_NONZERO(d) ? neg : false);
2111 btemp.rdx = 0;
2438 bool zero = true, rdx;
2462 rdx = (ptr != NULL);
2475 n->scale = (size_t) (rdx *
2478 // Set rdx.
2483 i = len - (ptr == val ? 0 : i) - rdx;
2497 // I think I can set rdx directly to zero here because n should be a
2499 n->len = n->rdx = 0;
2650 size_t rdx;
2669 rdx = BC_NUM_RDX_VAL(m2);
2671 if (m2->len < rdx) m2->len = rdx;
2747 * @param rdx True if a decimal (radix) point should be printed.
2752 bc_num_printChar(size_t n, size_t len, bool rdx, bool bslash)
2754 BC_UNUSED(rdx);
2769 * @param rdx True if a decimal (radix) point should be printed.
2774 bc_num_printDigits(size_t n, size_t len, bool rdx, bool bslash)
2779 bc_num_putchar(rdx ? '.' : ' ', true);
2808 * @param rdx True if a decimal (radix) point should be printed.
2813 bc_num_printHex(size_t n, size_t len, bool rdx, bool bslash)
2820 if (rdx) bc_num_putchar('.', true);
2834 size_t i, j, rdx = BC_NUM_RDX_VAL(n);
2843 bool irdx = (i == rdx - 1);
3392 n->rdx = BC_NUM_NEG_VAL(n, neg);
3468 // I can just copy directly here because the sign *and* rdx will be
3470 d->rdx = s->rdx;
4003 size_t max, rdx;
4007 rdx = bc_vm_growSize(BC_NUM_RDX_VAL(a), BC_NUM_RDX_VAL(b));
4011 max = bc_vm_growSize(BC_MAX(max, rdx), 1);
4012 rdx = bc_vm_growSize(bc_vm_growSize(bc_num_int(a), bc_num_int(b)), max);
4014 return rdx;
4020 size_t max, rdx;
4024 rdx = bc_vm_growSize(BC_NUM_RDX_VAL(a), BC_NUM_RDX_VAL(b));
4028 max = bc_vm_growSize(BC_MAX(max, rdx), 1);
4029 rdx = bc_vm_growSize(bc_num_int(a), max);
4031 return rdx;
4133 size_t pow, len, rdx, req, resscale, realscale;
4150 rdx = BC_NUM_RDX(realscale);
4153 req = bc_vm_growSize(BC_MAX(rdx, BC_NUM_RDX_VAL(a)), len >> 1);
4184 rdx = BC_NUM_RDX(realscale);
4185 rdx = BC_MAX(rdx, BC_NUM_RDX_VAL(a));
4186 len = bc_vm_growSize(a->len, rdx);
4233 // I can set the rdx here directly because neg should be false.
4234 x0->scale = x0->rdx = 0;
4474 bc_file_printf(&vm->fout, " len: %zu, rdx: %zu, scale: %zu\n", name, n->len,