Date: Sat, 15 Feb 2003 09:20:59 +1030 From: Greg Lewis <glewis@eyesbeyond.com> To: Huang wen hui <hwh@gddsn.org.cn> Cc: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? Message-ID: <20030215092059.A8186@misty.eyesbeyond.com> In-Reply-To: <3E4C9DDD.4040204@gddsn.org.cn>; from hwh@gddsn.org.cn on Fri, Feb 14, 2003 at 03:42:21PM %2B0800 References: <3E4C9DDD.4040204@gddsn.org.cn>
next in thread | previous in thread | raw e-mail | index | archive | help
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? Are you using green threads and classic, i.e. what is the output of java-version? > /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) -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org 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?20030215092059.A8186>