Lines Matching defs:nd

571 make_zero(int nd, sc_digit *d)
573 vec_zero(nd, d);
588 trim(small_type added, int nb, int nd, sc_digit *d)
591 sc_assert((nb > 0) && (nd > 0) && (d != NULL));
593 d[nd - 1] &= one_and_ones(bit_ord(nb - 1) + added);
600 small_type s, int nb, int nd, sc_digit *d)
603 vec_complement(nd, d);
604 trim(added, nb, nd, d);
611 convert_SM_to_2C(small_type s, int nd, sc_digit *d)
614 vec_complement(nd, d);
625 trim_signed(int nb, int nd, sc_digit *d)
628 sc_assert((nb > 0) && (nd > 0) && (d != NULL));
630 d[nd - 1] &= one_and_ones(bit_ord(nb - 1) + 1);
634 // sign-magnitude representation, and return its sign. nd is d's
637 convert_signed_2C_to_SM(int nb, int nd, sc_digit *d)
640 sc_assert((nb > 0) && (nd > 0) && (d != NULL));
648 if (d[nd - 1] & one_and_zeros(xnb - 1)) {
650 vec_complement(nd, d);
656 d[nd - 1] &= one_and_ones(xnb);
660 return check_for_zero(s, nd, d);
667 // sign-magnitude representation, and return its sign. nd is d's
670 convert_signed_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
672 convert_SM_to_2C(s, nd, d);
673 return convert_signed_2C_to_SM(nb, nd, d);
679 convert_signed_SM_to_2C_trimmed(small_type s, int nb, int nd, sc_digit *d)
681 convert_SM_to_2C_trimmed(1, s, nb, nd, d);
687 convert_signed_SM_to_2C(small_type s, int nd, sc_digit *d)
689 convert_SM_to_2C(s, nd, d);
700 trim_unsigned(int nb, int nd, sc_digit *d)
703 sc_assert((nb > 0) && (nd > 0) && (d != NULL));
706 d[nd - 1] &= one_and_ones(bit_ord(nb - 1));
710 // sign-magnitude representation, and return its sign. nd is d's
713 convert_unsigned_2C_to_SM(int nb, int nd, sc_digit *d)
715 trim_unsigned(nb, nd, d);
716 return check_for_zero(SC_POS, nd, d);
721 // sign-magnitude representation, and return its sign. nd is d's
724 convert_unsigned_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
726 convert_SM_to_2C(s, nd, d);
727 return convert_unsigned_2C_to_SM(nb, nd, d);
733 convert_unsigned_SM_to_2C_trimmed(small_type s, int nb, int nd, sc_digit *d)
735 convert_SM_to_2C_trimmed(0, s, nb, nd, d);
741 convert_unsigned_SM_to_2C(small_type s, int nd, sc_digit *d)
743 convert_SM_to_2C(s, nd, d);