This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
problem(?) using java.lang.Float in arithmetic operation
- From: cr blimp <crblimp at yahoo dot com>
- To: kawa at sourceware dot org
- Date: Thu, 19 Jul 2007 03:41:35 -0700 (PDT)
- Subject: problem(?) using java.lang.Float in arithmetic operation
Hi,
I'm exploring using Kawa as a scripting system for a
java math package.
So far things are looking quite promising.
One question -
I'm extracting a single float from a java float[]
array returned
from said library. It appears that when such a float
is passed to "-", i.e.:
(set! arr (java-library-returns-float))
(set! x (arr 0))
(set! y (- x))
there is a type error -
procedure main throws exception
java.lang.ClassCastException: java.lang.Float
Invalid parameter, was: java.lang.Float
Is there a function to convert a java.lang.Float to a
scheme real?
If not, I could redefine all the basic arithmetic
operations
as calls to java. Is this the appropriate approach?
Thanks for any advice
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz