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]

Re: Bug on Solaris


Hi Andrew, thanks for your reply!

On Tue, Jan 08, 2002 at 09:17:07AM +0000, Andrew Haley wrote:
> 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.

$ cat hello.java
public class hello
{
 public static void main(String[] args)
    {
     System.out.println("Double.MIN_VALUE = " + Double.MIN_VALUE 
             + "  " + Double.doubleToLongBits(Double.MIN_VALUE));
     System.out.println("Double.MAX_VALUE = " + Double.MAX_VALUE 
             + "  " + Double.doubleToLongBits(Double.MAX_VALUE));
    }
}

$ gcj --encoding=UTF-8 -o hello hello.java --main=hello
$ ./hello
Double.MIN_VALUE = 0.0  0
Double.MAX_VALUE = 5.0E-324  1


on Linux in contrast:
Double.MIN_VALUE = 5.0E-324  1
Double.MAX_VALUE = 1.7976931348623157E308  9218868437227405311

Hope that helps,
Martin.

-- 
The early bird catches the worm. If you want something else for       
breakfast, get up later.


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