[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (typep 3 'complex) => t

I'd thought all along that the COMPLEX type was intended to be the
analog of RATIO, and not include those numbers which canonicalized to
RATIONAL. Your message seems to assert that the description on p 47
implies otherwise, but it seems more reasonable that this is just a case
of ambiguous wording. 

You claim  "Due to the rule for complex canonicalization, it makes no
sense to require the non-0 imagpart, since it makes the declaration
useless for complex numbers with rational components."

But it does make sense, and such declarations are useful, (well, as
useful as RATIO declarations) for example:

(typecase x
	(rational  ... )
	(complex (locally (declare (type complex x)) ...)

where one could assume within the scope of the declaration that realpart
and imagpart could be optimized, for example.