=, /=, <, >, <=, >= Function

Syntax

= &rest numbers+ generalized-boolean

/= &rest numbers+ generalized-boolean

< &rest numbers+ generalized-boolean

> &rest numbers+ generalized-boolean

<= &rest numbers+ generalized-boolean

>= &rest numbers+ generalized-boolean

Arguments and Values

number — for <, >, <=, >=: a real; for =, /=: a number.

generalized-boolean — a generalized boolean.

Description

=, /=, <, >, <=, and >= perform arithmetic comparisons on their arguments as follows:

=

The value of = is true if all numbers are the same in value; otherwise it is false. Two complexes are considered equal by = if their real and imaginary parts are equal according to =.

/=

The value of /= is true if no two numbers are the same in value; otherwise it is false.

<

The value of < is true if the numbers are in monotonically increasing order; otherwise it is false.

>

The value of > is true if the numbers are in monotonically decreasing order; otherwise it is false.

<=

The value of <= is true if the numbers are in monotonically nondecreasing order; otherwise it is false.

>=

The value of >= is true if the numbers are in monotonically nonincreasing order; otherwise it is false.

=, /=, <, >, <=, and >= perform necessary type conversions.

Examples

The uses of these functions are illustrated in Figure 12–13.

Exceptional Situations

Might signal type-error if some argument is not a real. Might signal arithmetic-error if otherwise unable to fulfill its contract.

Notes

= differs from eql in that `(= 0.0 -0.0)` is always true, because = compares the mathematical values of its operands, whereas eql compares the representational values, so to speak.