User Tools


====== Function REALPART, IMAGPART ====== ====Syntax==== * **realpart** //number// → //real// * **imagpart** //number// → //real// ====Arguments and Values==== * //number// - a //[[CL:Glossary:number]]//. * //real// - a //[[CL:Glossary:real]]//. ====Description==== **realpart** and **imagpart** return the real and imaginary parts of //number// respectively. If //number// is //[[CL:Glossary:real]]//, then **realpart** returns //number// and **imagpart** returns ''([[CL:Functions:math-multiply|*]] 0 //number//)'', which has the effect that the imaginary part of a //[[CL:Glossary:rational]]// is ''0'' and that of a //[[CL:Glossary:float]]// is a floating-point zero of the same format. ====Examples==== <blockquote> (realpart #c(23 41)) <r>23</r> (imagpart #c(23 41.0)) <r>41.0</r> (realpart #c(23 41.0)) <r>23.0</r> (imagpart 23.0) <r>0.0</r> </blockquote> ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== Should signal an error of type type-error if //number// is not a //[[CL:Glossary:number]]//. ====See Also==== * **[[CL:Functions:complex|Function COMPLEX]]** ====Notes==== None. \issue{REAL-NUMBER-TYPE:X3J13-MAR-89}