1
0
mirror of synced 2026-05-05 23:54:46 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/12-7-LOGEQV.TEST

40 lines
918 B
Plaintext

;; Function To Be Tested: LOGEQV
;;
;; Source: Guy L Steele's CLTL
;; Section: 12.7 Logical Operations on Numbers
;; Page: 221
;;
;; Created By: Kelly Roach
;;
;; Creation Date: July 12,1986
;;
;; Last Update: July 12,1986
;;
;; Filed As: {ERIS}<LISPCORE>CML>TEST>12-7-LOGEQV.TEST
;;
;;
;; Syntax: (LOGEQV &REST INTEGERS)
;;
;; Function Description:
;; This returns the bit-wise logical EQUIVALENCE (also known as EXCLUSIVE NOR)
;; of its arguments.
;; If no argument is given, then the result is -1,
;; which is an identity for this operation.
;;
;; Argument(s): INTEGERS - an integer
;;
;; Returns: a number
;;
(do-test logeqv-test
(and (eq (logand 1 (logeqv 0 0)) 1)
(eq (logand 1 (logeqv 0 1)) 0)
(eq (logand 1 (logeqv 1 0)) 0)
(eq (logand 1 (logeqv 1 1)) 1)
(eq (logeqv) -1)
(eq (logeqv 7 5 6) 4)))
STOP