ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   12 Numbers   12.2 Dictionary of Numbers

12.2.50 realpart, imagpart Function

realpart number    real

imagpart number    real

Arguments and Values:
number - a number.

real - a real.

realpart and imagpart return the real and imaginary parts of number respectively. If number is real, then realpart returns number and imagpart returns (* 0 number), which has the effect that the imaginary part of a rational is 0 and that of a float is a floating-point zero of the same format.

 (realpart #c(23 41))  23
 (imagpart #c(23 41.0))  41.0
 (realpart #c(23 41.0))  23.0
 (imagpart 23.0)  0.0

Exceptional Situations:
Should signal an error of type type-error if number is not a number.

See Also:

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2015 - File last updated 03-23-2015