Date: Sat, 15 Feb 2003 09:36:47 +0800 From: Huang wen hui <hwh@gddsn.org.cn> To: Greg Lewis <glewis@eyesbeyond.com> Cc: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? Message-ID: <3E4D99AF.60106@gddsn.org.cn> References: <3E4C9DDD.4040204@gddsn.org.cn> <20030215092059.A8186@misty.eyesbeyond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lewis wrote:
>On Fri, Feb 14, 2003 at 03:42:21PM +0800, Huang wen hui wrote:
>
>
>>hi,
>>I build jdk1.3.1-p8 for 4.7-STABLE(today), Math.pow return wrong value
>>if using the following example:
>>
>>
>>public class TestPow {
>>public static void main(String[] args) {
>>int exp =9;
>>int i = (int)Math.pow(2.0,(double)exp);
>>System.out.println("i="+i);
>>}
>>}
>>
>>----------output------------
>>%java TestPow
>>i=0
>>
>>
>
>I can't reproduce this problem:
>
>
>
>>/usr/local/jdk1.3.1/bin/java TestPow
>>
>>
>i=512
>
>(which looks right to me :).
>
>The only difference is that I am using 4.7-p3, not -STABLE. I will test
>a more recent 4.7 when I am able.
>
>When you say this worked with 1.3.1p7, were you also using a very recent
>-STABLE?
>
yes.
>Are you using green threads and classic, i.e. what is the output
>of java-version?
>
./jre/bin/java -version
java version "1.3.1-p7"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.3.1-p7-wsk-021111-19:16)
Classic VM (build 1.3.1-p7-wsk-021111-19:16, green threads, nojit)
%./jre/bin/java TestPow
i=512
>
>
>
>>/usr/local/jdk1.3.1/bin/java -version
>>
>>
>java version "1.3.1-p8"
>Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-p8-glewis-030211-14:01)
>Classic VM (build 1.3.1-p8-glewis-030211-14:01, green threads, nojit)
>
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E4D99AF.60106>
