The 'minusp' predicate function checks to see if the number 'expr' is negative. T is returned if the number is negative [less than zero], NIL is returned otherwise. An error is generated if the 'expr' is not a numeric expression:
error: bad argument type
(minusp 1) ; returns NIL (minusp 0) ; returns NIL (minusp -1) ; returns T (minusp -.000000005) ; returns T (minusp #xFFFFFFFF) ; returns T (minusp #x01) ; returns NIL (minusp 'a) ; error: bad argument type (setq a -3.5) ; set A to -3.5 (minusp a) ; returns T
See the
minusp
predicate function in the