[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (typep 3 'complex) => t
- To: RAM@C.CS.CMU.EDU
- Subject: Re: (typep 3 'complex) => t
- From: Masinter.pa@Xerox.COM
- Date: Sun, 23 Nov 1986 18:13:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Rob MacLachlan <RAM@C.CS.CMU.EDU>'s message of Sun, 23 Nov 86 15:36 EST
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:
(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.