Re: [Matlisp-devel] Re: (DOT REAL-MAT COMPLEX-MAT) ERROR

Raymond Toy <[email protected]>
Newsgroups gmane.lisp.matlisp.user
Message-ID <[email protected]>
>>>>> "Raymond" == Raymond Toy <[email protected]> writes:

    Raymond> In any case, I think the following solves the immediate problem:

    Raymond> (defmethod dot ((x complex-matrix) (y complex-matrix) &optional (conjugate-p t))
    Raymond>   (let* ((nxm (number-of-elements x))
    Raymond> 	 (store-x (store x))
    Raymond> 	 (store-y (store y))
    Raymond> 	 (dot (if conjugate-p
    Raymond> 		  (zdotc nxm store-x 1 store-y 1)
    Raymond> 		  (zdotu nxm store-x 1 store-y 1))))
    Raymond>     (if (zerop (imagpart dot))
    Raymond> 	(realpart dot)
    Raymond> 	(complex (realpart dot) (imagpart dot)))))

    Raymond> I think this need to be fixed in ffi-cmu.lisp in some way.  There's no
    Raymond> telling what other bugs will be found because of this, if I'm right.

I've committed a fix to ffi-cmu.lisp.  I'd appreciate it if you can
try it out.  It works for me. :-)

I hope Tunc will try your example with ACL to see if the same bug
exists there.

Ray
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.