Lines Matching refs:places_rdx

303 	size_t nrdx, places_rdx;  in bc_num_truncate()  local
308 places_rdx = nrdx ? nrdx - BC_NUM_RDX(n->scale - places) : 0; in bc_num_truncate()
309 assert(places <= n->scale && (BC_NUM_ZERO(n) || places_rdx <= n->len)); in bc_num_truncate()
312 BC_NUM_RDX_SET(n, nrdx - places_rdx); in bc_num_truncate()
322 n->len -= places_rdx; in bc_num_truncate()
323 memmove(n->num, n->num + places_rdx, BC_NUM_SIZE(n->len)); in bc_num_truncate()
334 size_t nrdx, places_rdx; in bc_num_extend() local
343 places_rdx = BC_NUM_RDX(places + n->scale) - nrdx; in bc_num_extend()
345 if (places_rdx) { in bc_num_extend()
346 bc_num_expand(n, bc_vm_growSize(n->len, places_rdx)); in bc_num_extend()
347 memmove(n->num + places_rdx, n->num, BC_NUM_SIZE(n->len)); in bc_num_extend()
348 memset(n->num, 0, BC_NUM_SIZE(places_rdx)); in bc_num_extend()
351 BC_NUM_RDX_SET(n, nrdx + places_rdx); in bc_num_extend()
353 n->len += places_rdx; in bc_num_extend()
409 static void bc_num_unshiftZero(BcNum *restrict n, size_t places_rdx) { in bc_num_unshiftZero() argument
410 n->len += places_rdx; in bc_num_unshiftZero()
411 n->num -= places_rdx; in bc_num_unshiftZero()
439 size_t places_rdx; in bc_num_shiftLeft() local
455 places_rdx = BC_NUM_RDX(places); in bc_num_shiftLeft()
461 if (nrdx >= places_rdx) { in bc_num_shiftLeft()
468 if (mod + revdig > BC_BASE_DIGS) places_rdx = 1; in bc_num_shiftLeft()
469 else places_rdx = 0; in bc_num_shiftLeft()
471 else places_rdx -= nrdx; in bc_num_shiftLeft()
474 if (places_rdx) { in bc_num_shiftLeft()
475 bc_num_expand(n, bc_vm_growSize(n->len, places_rdx)); in bc_num_shiftLeft()
476 memmove(n->num + places_rdx, n->num, BC_NUM_SIZE(n->len)); in bc_num_shiftLeft()
477 memset(n->num, 0, BC_NUM_SIZE(places_rdx)); in bc_num_shiftLeft()
478 n->len += places_rdx; in bc_num_shiftLeft()
498 size_t places_rdx, scale, scale_mod, int_len, expand; in bc_num_shiftRight() local
514 places_rdx = BC_NUM_RDX(places); in bc_num_shiftRight()
517 expand = places_rdx - 1; in bc_num_shiftRight()
518 places_rdx = 1; in bc_num_shiftRight()
521 expand = places_rdx; in bc_num_shiftRight()
522 places_rdx = 0; in bc_num_shiftRight()
528 bc_num_extend(n, places_rdx * BC_BASE_DIGS); in bc_num_shiftRight()