Bug on Solaris

Andrew Haley aph@cambridge.redhat.com
Tue Jan 8 01:17:00 GMT 2002


Martin Kahlert writes:
 > Hi!
 > I continue struggling to compile my application on Solaris.
 > It compiles finally, but does not work correctly. Here is a small
 > test case:
 > 
 > $ cat hello.java
 > public class hello
 > {
 >  public static void main(String[] args)
 >     {
 >      System.out.println("Double.MIN_VALUE = " + Double.MIN_VALUE);
 >      System.out.println("Double.MAX_VALUE = " + Double.MAX_VALUE);
 >     }
 > }
 > 
 > $ gcj --encoding=UTF-8 -o hello hello.java --main=hello
 > $ ./hello
 > Double.MIN_VALUE = 0.0
 > Double.MAX_VALUE = 5.0E-324
 > 
 > On Linux i get a better result:
 > Double.MIN_VALUE = 5.0E-324
 > Double.MAX_VALUE = 1.7976931348623157E308
 > 
 > Can anybody tell my, what went wrong here?

Um, looks like a compiler problem.  Maybe.

Can you try the above test with doubleToLongBits() as well, so we can
see what is going on.

Andrew.



More information about the Java mailing list