The 'zerop' predicate function checks to see if the number 'expr' is zero. T is returned if the number is zero, NIL is returned otherwise. An error is generated if the 'expr' is not a numeric expression:
error: bad argument type
(zerop 0) ; returns T (zerop 0.0) ; returns T (zerop 99999.9) ; returns NIL (zerop -0.000000000002) ; returns NIL (zerop 'a) ; error: bad argument type (setq a 0) ; set value of A to 0 (zerop a) ; returns T
See the
zerop
predicate function in the