This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: can't compile complex
- To: Marco Vezzoli <marco dot vezzoli at st dot com>
- Subject: Re: can't compile complex
- From: Per Bothner <per at bothner dot com>
- Date: 24 Dec 1999 09:59:17 -0800
- Cc: kawa at sourceware dot cygnus dot com
- References: <38632F2D.A85519D1@st.com>
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/