Hi,

I'm experimenting trying to use complex numbers specialized on fixnums
in place of a 2 element simple-vector. However, CMUCL 19a (Linux
binary) compiler fails when the type of a variable is declared to be
'(complex fixnum):

* (deftype 2vec () '(complex fixnum))

2VEC
* (defun a (b) (declare (type 2vec b)) b)

A
* (compile 'a)
; Compiling LAMBDA (B):

Error in function KERNEL:CONTAINING-INTEGER-TYPE:
   #<NUMERIC-TYPE (COMPLEX FIXNUM)> isn't an integer type?
   [Condition of type SIMPLE-ERROR]

Restarts:
  0: [ABORT] Return to Top-Level.

Going one place up the type tree, the same error is given for
'(complex integer). However, '(complex rational) and '(complex float)
compile (and seem to work) fine.

While I'm on the subject, will the '(complex fixnum) declaration do
anything to speed up addition of fixnum complexes (complexi?)? I've
read that appropriate '(complex float) declarations do. (I haven't
downloaded 19a sources yet to check out for myself what the compiler
does).

Vladimir


Reply via email to