Arithmetic Predicates



numberp object [function]
T if object is number, namely integer or float. Note that characters are also represented by numbers.


integerp object [function]
T if object is an integer number. A float can be converted to an integer by round, trunc and ceiling functions.


floatp object [function]
T if object is a floating-point number. An integer can be converted to a float by the float function.


zerop number [function]

T if the number is integer zero or float 0.0.


plusp number [function]
equivalent to ($>$ number 0).


minusp number [function]
equivalent to ($<$ number 0).


oddp integer [function]

The argument must be an integer. T if integer is odd.


evenp integer [function]

The argument must be an integer. T if integer is an even number.


/= n1 n2 &rest more-numbers [function]

Both n1, n2 and all elements of more-numbers must be numbers. T if no two of its arguments are numerically equal, NIL otherwise.


= num1 num2 &rest more-numbers [function]

Both n1 and n2 and all elements of more-numbers must be numbers. T if n1, n2 and all elements of more-numbers are the same in value, NIL otherwise.


$>$ num1 num2 &rest more-numbers [function]

Both n1 and n2 and all elements of more-numbers must be numbers. T if n1, n2 and all elements of more-numbers are in monotonically decreasing order, NIL otherwise. For numerical comparisons with tolerance, use functions prefixed by eps as described in the section 16.


$<$ num1 num2 &rest more-numbers [function]

Both n1 and n2 and all elements of more-numbers must be numbers. T if n1, n2 and all elements of more-numbers are in monotonically increasing order, NIL otherwise. For numerical comparisons with tolerance, use functions prefixed by eps as described in the section 16.


$>=$ num1 num2 &rest more-numbers [function]

Both n1 and n2 and all elements of more-numbers must be numbers. T if n1, n2 and all elements of more-numbers are in monotonically nonincreasing order, NIL otherwise. For numerical comparisons with tolerance, use functions prefixed by eps as described in the section 16.


$<=$ num1 num2 &rest more-numbers [function]

Both n1 and n2 and all elements of more-numbers must be numbers. T if n1, n2 and all elements of more-numbers are in monotonically nondecreasing order, NIL otherwise. For numerical comparisons with tolerance, use functions prefixed by eps as described in the section 16.


2016-03-23