>>>>> "Michael" == Michael A Koerber <[EMAIL PROTECTED]> writes:
Michael> is this an error:
CL-USER> (type-of (complex 1.0 0.0))
Michael> (COMPLEX (SINGLE-FLOAT 0.0 1.0))
I think this is ok. The CLHS entry says (complex <typespec>) and
(single-float 0.0 1.0) is the typespec. This tells the compiler that
the real (and imaginary) part is a (single-float 0.0 1.0).
Michael> I was expecting '(COMPLEX SINGLE-FLOAT). I also noted in
comparing the
Michael> examples in the hyperspec that:
Michael> (TYPE-OF #C(0 1)) => (COMPLEX BIT) not (COMPLEX INTEGER) and
Michael> (TYPE-OF #C(1 0)) => (INTEGER 1 1) not (COMPLEX INTEGER)
Examples are just examples. Not sure about the first one; 2005-04
cmucl says (complex (rational 0 1)). The second is clearly wrong
because #c(1 0) is always 1 and therefore must be something like
(integer 1 1). You can't create a complex number with
rational realpart and (exact) zero imaginary part.
Ray