next up previous contents
Next: Extensions Up: Mathematical Expressions Previous: Numeric Functions

Numeric Relations

The set of relations on numbers is based on KIF [6].

<
<= (<= x y)(or (< x y) (= x y)) 
>= (>= x y)(or (> x y) (= x y))
> (> x y)(< y x)
positive (positive x)(> x 0)
negative (negative x)(< x 0)
zero (zero x)(= x 0)
integer
odd (odd x)(integer (/ (+ x 1) 2))
even (even x)(integer (/ x 2))

The use of <= deviates from KIF, which uses =<. In this case, KIF deviates from Common Lisp due to a conflict with the implication operator. CML retains the Common Lisp form.

As mentioned (See section gif, page gif), these functions are extended to apply to non-constant quantities.



Tom Mostek
Wed Jan 21 13:00:43 CST 1998