Trying to merge java.lang.Float, java.lang.Double with Classpath -- help wanted

Andrew Haley aph@redhat.com
Mon Sep 22 15:24:00 GMT 2003


Dalibor Topic writes:
 > Andrew Haley wrote:
 > > Nathanael Nerode writes:
 > >  > >They are only GCJ-specific because they use CNI. There is nothing that 
 > >  > >is specific to any given VM implementation, ie a JNI implementation in 
 > >  > >classpath should work anywhere.
 > >  > 
 > >  > They depend on the bit encoding of doubles and floats.  This is not 
 > >  > specified on the Java Virtual Machine specification;
 > > 
 > > Yes it is; the Java VM requires IEEE-754.
 > > 
 > > http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#33377
 > 
 > Yep, and the underlying C native code [1] may not be offering
 > IEEE-754, as the ISO C standard doesn't specify a floating format,
 > AFAIK. So you *may* need some abstraction/conversison layer between
 > the OS representation of floating points and Java's representation
 > of floating points.

Let's cross that particular bridge when we come to it.

 > At least if you're interested in portability to non-IEEE754 machines ;)
 > 
 > That's why I like Classpath's design better, but then, I'm not a gcj 
 > developer yet, maybe next year ;)

Well, we all have to get used to the idea that gcj and Classpath don't
have exactly the same goals, so in some cases there will be
divergence.

Andrew.



More information about the Java-patches mailing list