numbernumber, t
The following seems to fluffy to me. Besides you can find the same info elsewhere
in more rigorous form. -kmp 13-Nov-90
There are \term{real} and \term{complex} \term{numbers}.
\term{Real} numbers are further divided into \term{floats},
\term{rationals}, and \term{integers}.
Replaced by:The type number contains objects which represent mathematical numbers. The types real and complex are disjoint subtypes of number.
I added this: -kmp 15-Nov-90The function = tests for numerical equality. The function eql, when its arguments are both numbers, tests that they have both the same type and numerical value. 12.0.0 4Two numbers that are the same under eql or = are not necessarily the same under eq.
2.1.4 1 2.1.4 4
Common Lisp differs from mathematics on some naming issues. In mathematics, the set of real numbers is traditionally described as a subset of the complex numbers, but in Common Lisp, the type real and the type complex are disjoint. The Common Lisp type which includes all mathematical complex numbers is called number. The reasons for these differences include historical precedent, compatibility with most other popular computer languages, and various issues of time and space efficiency.
RWK notes: Another way of describing this is that fundamental number types fixnum, bignum, xxx-float, ratio, complex, ... all name representations and are names for finite subsets of the corresponding mathematical concepts. Thus, complex is a type which can represent complex numbers. The extra capability of this type means that even if the imaginary part is 0.0, it is not a member of the more restrictive representation real. Ultimately I didn't buy this because it presumes that types are only about how a number is represented. But 1.0 is not represented as a real. In fact, no number is. Rather, they are represented as subtypes of reals, and so real is available only for categorization. Anyway, I decided to just let things stand as they are for brevity and let others intuit other explanations that make them happy.