This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: can't compile complex


Marco Vezzoli <marco.vezzoli@st.com> writes:

> Anytime I use a complex number and I try to compile I get
> 
> Unimplemented compileConstant for class gnu.math.CComplex

That's true - there is no support for compiling complex
literals (constants).  A work-around is to use (e.g.):
        (make-rectangular 3 4)
instead of:
        3+4i

The correct fix is to make the classes DComplex and CComplex
in gnu.math implement the Compilable interface.  It would not
be difficult.

I've been putting it off, because I wanted to figure out a way to not
have gnu.math require gnu.expr.  I could hardwire knowledge of the
gnu.math classes into gnu.expr.Literal, but I prefer not to do that.

I think the long-term solution is to use the serialization
framework.  The best way to do that I don't know yet.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]