government / src / internal / lisptest / testdata / comparison.gov.lisp

@ 27e33aecf4976d7646339e35c5fff6755a29497c | history


(< 1 2)               ;=> T
(>= 2 3)              ;=> F
(<= 1.0 1)            ;=> T
(== 1 1.0)            ;=> T
(== "a" "a")          ;=> T
(== 'a 'b)            ;=> F
(== 1 "1")            ;=> F
(== '(1 (2 3)) '(1 (2 3)))   ;=> T
(!= '(1 . 2) '(1 2))  ;=> T

; Exact even where floats round: 9007199254740993 is 2^53 + 1.
(== 9007199254740993 9007199254740992.0)   ;=> F

(< "a" "b")           ;=! must be a number
(== + +)              ;=! cannot compare functions