=
&rest numbers^+ => generalized-boolean
/=
&rest numbers^+ => generalized-boolean
<
&rest numbers^+ => generalized-boolean
>
&rest numbers^+ => generalized-boolean
<=
&rest numbers^+ => generalized-boolean
>=
&rest numbers^+ => generalized-boolean
number--for <, >, <=, >=: a real; for =, /=: a number.
generalized-boolean--a generalized boolean.
=, /=, <, >, <=, and >= perform arithmetic comparisons on their arguments as follows:
=, /=, <, >, <=, and >= perform necessary type conversions.
The uses of these functions are illustrated in Figure 12-12.
(= 3 3) is true. (/= 3 3) is false. (= 3 5) is false. (/= 3 5) is true. (= 3 3 3 3) is true. (/= 3 3 3 3) is false. (= 3 3 5 3) is false. (/= 3 3 5 3) is false. (= 3 6 5 2) is false. (/= 3 6 5 2) is true. (= 3 2 3) is false. (/= 3 2 3) is false. (< 3 5) is true. (<= 3 5) is true. (< 3 -5) is false. (<= 3 -5) is false. (< 3 3) is false. (<= 3 3) is true. (< 0 3 4 6 7) is true. (<= 0 3 4 6 7) is true. (< 0 3 4 4 6) is false. (<= 0 3 4 4 6) is true. (> 4 3) is true. (>= 4 3) is true. (> 4 3 2 1 0) is true. (>= 4 3 2 1 0) is true. (> 4 3 3 2 0) is false. (>= 4 3 3 2 0) is true. (> 4 3 1 2 0) is false. (>= 4 3 1 2 0) is false. (= 3) is true. (/= 3) is true. (< 3) is true. (<= 3) is true. (= 3.0 #c(3.0 0.0)) is true. (/= 3.0 #c(3.0 1.0)) is true. (= 3 3.0) is true. (= 3.0s0 3.0d0) is true. (= 0.0 -0.0) is true. (= 5/2 2.5) is true. (> 0.0 -0.0) is false. (= 0 -0.0) is true. (<= 0 x 9) is true if x is between 0 and 9, inclusive (< 0.0 x 1.0) is true if x is between 0.0 and 1.0, exclusive (< -1 j (length v)) is true if j is a valid array index for a vector v Figure 12--12: Uses of /=, =, <, >, <=, and >=
Might signal type-error if some argument is not a real. Might signal arithmetic-error if otherwise unable to fulfill its contract.
= 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.
*
&rest numbers => product
number--a number.
product--a number.
Returns the product of numbers, performing any necessary type conversions in the process. If no numbers are supplied, 1 is returned.
(*) => 1 (* 3 5) => 15 (* 1.0 #c(22 33) 55/98) => #C(12.346938775510203 18.520408163265305)
Might signal type-error if some argument is not a number. Might signal arithmetic-error.
+
&rest numbers => sum
number--a number.
sum--a number.
Returns the sum of numbers, performing any necessary type conversions in the process. If no numbers are supplied, 0 is returned.
(+) => 0 (+ 1) => 1 (+ 31/100 69/100) => 1 (+ 1/5 0.8) => 1.0
Might signal type-error if some argument is not a number. Might signal arithmetic-error.
-
number => negation
-
minuend &rest subtrahends^+ => difference
number, minuend, subtrahend--a number.
negation, difference--a number.
The function - performs arithmetic subtraction and negation.
If only one number is supplied, the negation of that number is returned.
If more than one argument is given, it subtracts all of the subtrahends from the minuend and returns the result.
The function - performs necessary type conversions.
(- 55.55) => -55.55 (- #c(3 -5)) => #C(-3 5) (- 0) => 0 (eql (- 0.0) -0.0) => true (- #c(100 45) #c(0 45)) => 100 (- 10 1 2 3 4) => 0
Might signal type-error if some argument is not a number. Might signal arithmetic-error.
/
number => reciprocal
/
numerator &rest denominators^+ => quotient
number, denominator--a non-zero number.
numerator, quotient, reciprocal--a number.
The function / performs division or reciprocation.
If no denominators are supplied, the function / returns the reciprocal of number.
If at least one denominator is supplied, the function / divides the numerator by all of the denominators and returns the resulting quotient.
If each argument is either an integer or a ratio, and the result is not an integer, then it is a ratio.
The function / performs necessary type conversions.
If any argument is a float then the rules of floating-point contagion apply; see Floating-point Computations.
(/ 12 4) => 3 (/ 13 4) => 13/4 (/ -8) => -1/8 (/ 3 4 5) => 3/20 (/ 0.5) => 2.0 (/ 20 5) => 4 (/ 5 20) => 1/4 (/ 60 -2 3 5.0) => -2.0 (/ 2 #c(2 2)) => #C(1/2 -1/2)
The consequences are unspecified if any argument other than the first is zero. If there is only one argument, the consequences are unspecified if it is zero.
Might signal type-error if some argument is not a number. Might signal division-by-zero if division by zero is attempted. Might signal arithmetic-error.