System Class complex

Class Precedence List:

complex, number, t

Description:

RWK: Again, describe it as a representation which is -capable- of representing complex numbers. 1.0 has a different, more restricted representation.

The type complex includes all mathematical complex numbers other than those included in the type rational. Complexes are "represented" -> "expressed". Some reviewer had problems with "represented". -kmpexpressed in Cartesian form with a real part and an imaginary part, each of which is a real. The real part and imaginary part are either both rational or both of the same float type. The imaginary part can be a float zero, but can never be a rational zero, for such a number is always represented by Common Lisp as a rational rather than a complex.

Compound Type Specifier Kind:

Specializing.

Compound Type Specifier Syntax:

4.5.0 11

complex [typespec | *]

Compound Type Specifier Arguments:

typespec—a type specifier that denotes a subtype of type real.

Compound Type Specifier Description:

Editor: KMP: If you ask me, this definition is a complete mess. Looking at issue ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:UNIFY-UPGRADING does not help me figure it out, either. Anyone got any suggestions?

Every element of this type is a complex whose real part and imaginary part are each of type (upgraded-complex-part-type typespec). The following will be left out: \param{type}. This type encompasses those complexes that can result by giving numbers of type typespec to complex. The following will be deleted: This might be different from what the \term{type} means for discrimination purposes. For example, Gaussian integers might be described as the type {\tt (complex integer)}, even in implementations where giving two \term{integers} to \funref{complex} results in an \term{object} of type {\tt (complex rational)}. 2.1.4 3 The type of a specific \term{complex} is indicated by a list of the word \misc{complex} and the type of the components; for example, a specialized representation for \typeref{complex} numbers with \term{short float} parts would be of type {\tt (complex short-float)}. \Thetype{complex} encompasses all complex representations. End of deletion.

(complex type-specifier) refers to all complexes that can result from giving numbers of type type-specifier to the function complex, plus all other complexes of the same specialized representation. Must fix the following according to Moon's 7-jul mail will fix for next edition. Both the real and the imaginary parts of any such \term{complex} must satisfy: \rbracket\ '\param{type-specifier})}

See Also:

Section 12.1.5.3 (Rule of Canonical Representation for Complex Rationals), Section 2.3.2 (Constructing Numbers from Tokens), Section 22.1.3.1.4 (Printing Complexes)

Notes:

The input syntax for a complex with real part r and imaginary part i is #C(r i). For further details, see Section 2.4 (Standard Macro Characters).

For every float, n, there is a complex which represents the same mathematical number and which can be obtained by (COERCE n 'COMPLEX).