Bitwise logical equivalence of zero or more integers
When integers are viewed in their two's complement representation,
The guard for
Macro:
(defmacro logeqv (&rest args) (cond ((null args) -1) ((null (cdr args)) (cons 'the (cons 'integer (cons (car args) 'nil)))) (t (xxxjoin 'binary-logeqv args))))
Function:
(defun binary-logeqv (i j) (declare (xargs :guard (and (integerp i) (integerp j)))) (logand (logorc1 i j) (logorc1 j i)))