This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bug on Solaris


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.


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