Lines Matching refs:nd

756 make_zero(int nd, sc_digit *d)
758 vec_zero(nd, d);
774 trim(small_type added, int nb, int nd, sc_digit *d)
777 assert((nb > 0) && (nd > 0) && (d != NULL));
780 d[nd - 1] &= one_and_ones(bit_ord(nb - 1) + added);
788 small_type s, int nb, int nd, sc_digit *d)
791 vec_complement(nd, d);
792 trim(added, nb, nd, d);
800 convert_SM_to_2C(small_type s, int nd, sc_digit *d)
803 vec_complement(nd, d);
815 trim_signed(int nb, int nd, sc_digit *d)
818 assert((nb > 0) && (nd > 0) && (d != NULL));
821 d[nd - 1] &= one_and_ones(bit_ord(nb - 1) + 1);
825 // sign-magnitude representation, and return its sign. nd is d's
829 convert_signed_2C_to_SM(int nb, int nd, sc_digit *d)
833 assert((nb > 0) && (nd > 0) && (d != NULL));
841 if (d[nd - 1] & one_and_zeros(xnb - 1)) {
843 vec_complement(nd, d);
849 d[nd - 1] &= one_and_ones(xnb);
853 return check_for_zero(s, nd, d);
861 // sign-magnitude representation, and return its sign. nd is d's
865 convert_signed_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
867 convert_SM_to_2C(s, nd, d);
868 return convert_signed_2C_to_SM(nb, nd, d);
875 convert_signed_SM_to_2C_trimmed(small_type s, int nb, int nd, sc_digit *d)
877 convert_SM_to_2C_trimmed(1, s, nb, nd, d);
884 convert_signed_SM_to_2C(small_type s, int nd, sc_digit *d)
886 convert_SM_to_2C(s, nd, d);
898 trim_unsigned(int nb, int nd, sc_digit *d)
901 assert((nb > 0) && (nd > 0) && (d != NULL));
904 d[nd - 1] &= one_and_ones(bit_ord(nb - 1));
908 // sign-magnitude representation, and return its sign. nd is d's
912 convert_unsigned_2C_to_SM(int nb, int nd, sc_digit *d)
914 trim_unsigned(nb, nd, d);
915 return check_for_zero(SC_POS, nd, d);
920 // sign-magnitude representation, and return its sign. nd is d's
924 convert_unsigned_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
926 convert_SM_to_2C(s, nd, d);
927 return convert_unsigned_2C_to_SM(nb, nd, d);
934 convert_unsigned_SM_to_2C_trimmed(small_type s, int nb, int nd, sc_digit *d)
936 convert_SM_to_2C_trimmed(0, s, nb, nd, d);
943 convert_unsigned_SM_to_2C(small_type s, int nd, sc_digit *d)
945 convert_SM_to_2C(s, nd, d);