BVEC bvec_sub ( BVEC  left,
BVEC  right 
)

Builds a boolean vector for subtraction.

Builds a new boolean vector that represents the subtraction of two other vectors. Each element $x_i$ in the result will represent the function

\[ x_i = l_i\ \mbox{xor}\ r_i\ \mbox{xor}\ c_{i-1} \]

where the carry in $c_i$ is

\[ c_i = (l_i\ \mbox{and}\ r_i\ \mbox{and}\ c_{i-1})\ \mbox{or}\ (\mbox{not}\ l_i\ \mbox{and}\ (r_i\ \mbox{or}\ c_{i-1})) \]

It is important for efficency that the BDD variables used in l and r are interleaved.

Returns:
The result of the subtraction (which is already reference counted).
See also:
bvec_add, bvec_mul, bvec_shl


Generated on Mon Jul 23 13:25:16 2007 for BuDDy by  doxygen 1.5.1