# Differences

This shows you the differences between two versions of the page.

 — cl:types:complex [2017/05/01 21:00] (current) Line 1: Line 1: + ====== System Class COMPLEX ====== + + ====Class Precedence List==== ​ + **complex**,​ **[[CL:​Types:​number]]**,​ **[[CL:​Types:​t]]** + + ====Description==== + The type **complex** includes all mathematical complex numbers other than those included in the type **[[CL:​Types:​rational]]**. //​[[CL:​Glossary:​Complexes]]//​ are + + expressed in Cartesian form with a real part and an imaginary part, each of which is a //​[[CL:​Glossary:​real]]//​. The real part and imaginary part are either both //​[[CL:​Glossary:​rational]]//​ or both of the same //​[[CL:​Glossary:​float]]//​ //​[[CL:​Glossary:​type]]//​. The imaginary part can be a //​[[CL:​Glossary:​float]]//​ zero, but can never be a //​[[CL:​Glossary:​rational]]//​ zero, for such a number is always represented by Common Lisp as a //​[[CL:​Glossary:​rational]]//​ rather than a //​[[CL:​Glossary:​complex]]//​. + + ====Compound Type Specifier Kind==== + Specializing. + + ====Compound Type Specifier Syntax==== + * **complex** [//​typespec//​ | **[[CL:​Types:​wildcard|*]]**] + + ====Compound Type Specifier Arguments==== + * //​typespec//​ - a //​[[CL:​Glossary:​type specifier]]//​ that denotes a subtype of **[[CL:​Types:​real]]**. + + ====Compound Type Specifier Description==== + Every element of this //​[[CL:​Glossary:​type]]//​ is a //​[[CL:​Glossary:​complex]]//​ whose real part and imaginary part are each of type ''​(upgraded-complex-part-type //​typespec//​)''​. + + This //​[[CL:​Glossary:​type]]//​ encompasses those //​[[CL:​Glossary:​complexes]]//​ that can result by giving numbers of //​[[CL:​Glossary:​type]]//​ //​typespec//​ to **[[CL:​Functions:​complex]]**. + + ''​(complex //​type-specifier//​)]]''​ refers to all //​[[CL:​Glossary:​complexes]]//​ that can result from giving //​[[CL:​Glossary:​number|numbers]]//​ of //type// //​type-specifier//​ to the function **[[CL:​Functions:​complex]]**,​ plus all other //​[[CL:​Glossary:​complexes]]//​ of the same specialized representation. + + ====See Also==== + * {\secref\RuleOfCanonRepForComplexRationals} + * {\secref\NumsFromTokens},​ {\secref\PrintingComplexes} + + ====Notes==== + The input syntax for a //​[[CL:​Glossary:​complex]]//​ with real part ''//​r//''​ and imaginary part ''//​i//''​ is ''#​C(//​r//​ //​i//​)''​. For further details, see section {\secref\StandardMacroChars}. + + For every //​[[CL:​Glossary:​float]]//,​ ''​n'',​ there is a //​[[CL:​Glossary:​complex]]//​ which represents the same mathematical number and which can be obtained by **[[CL:​Functions:​(COERCE ''​n''​ '​COMPLEX)]]**. + + \issue{ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:​UNIFY-UPGRADING} \issue{ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:​UNIFY-UPGRADING}