DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) Complex Numbers

Info Catalog (guile.info.gz) Reals and Rationals (guile.info.gz) Numbers (guile.info.gz) Exactness
 
 21.2.4 Complex Numbers
 ----------------------
 
 Complex numbers are the set of numbers that describe all possible points
 in a two-dimensional space.  The two coordinates of a particular point
 in this space are known as the "real" and "imaginary" parts of the
 complex number that describes that point.
 
    In Guile, complex numbers are written in rectangular form as the sum
 of their real and imaginary parts, using the symbol `i' to indicate the
 imaginary part.
 
      3+4i
      =>
      3.0+4.0i
 
      (* 3-8i 2.3+0.3i)
      =>
      9.3-17.5i
 
    Guile represents a complex number as a pair of numbers both of which
 are real, so the real and imaginary parts of a complex number have the
 same properties of inexactness and limited precision as single real
 numbers.
 
  -- Scheme Procedure: complex? x
  -- C Function: scm_number_p (x)
      Return `#t' if X is a complex number, `#f' otherwise.  Note that
      the sets of real, rational and integer values form subsets of the
      set of complex numbers, i. e. the predicate will also be fulfilled
      if X is a real, rational or integer number.
 
Info Catalog (guile.info.gz) Reals and Rationals (guile.info.gz) Numbers (guile.info.gz) Exactness
automatically generated byinfo2html