From owner-freebsd-java Fri Feb 14 21:17:13 2003 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3571E37B401 for ; Fri, 14 Feb 2003 21:17:11 -0800 (PST) Received: from gddsn.org.cn (mail.gddsn.org.cn [210.21.6.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9BF943F85 for ; Fri, 14 Feb 2003 21:17:10 -0800 (PST) (envelope-from hwh@gddsn.org.cn) Received: from gddsn.org.cn (gw [210.21.6.34]) by gddsn.org.cn (Postfix) with ESMTP id 3F5C238CD70; Sat, 15 Feb 2003 09:42:04 +0800 (CST) Message-ID: <3E4D9AEB.3020402@gddsn.org.cn> Date: Sat, 15 Feb 2003 09:42:03 +0800 From: Huang wen hui User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; zh-CN; rv:1.1) Gecko/20021225 X-Accept-Language: zh-cn, zh-tw, en-us MIME-Version: 1.0 To: Greg Lewis Cc: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? References: <3E4C9DDD.4040204@gddsn.org.cn> <20030215092059.A8186@misty.eyesbeyond.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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