From owner-freebsd-java Fri Feb 14 14:53:44 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 4226837B401 for ; Fri, 14 Feb 2003 14:53:43 -0800 (PST) Received: from mgr3.xmission.com (mgr3.xmission.com [198.60.22.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4E1143F93 for ; Fri, 14 Feb 2003 14:53:42 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: from mail by mgr3.xmission.com with spam-scanned (Exim 3.35 #1) id 18joiE-00035p-03; Fri, 14 Feb 2003 15:53:42 -0700 Received: from [207.135.128.145] (helo=misty.eyesbeyond.com) by mgr3.xmission.com with esmtp (Exim 3.35 #1) id 18joiC-00031O-03; Fri, 14 Feb 2003 15:53:41 -0700 Received: (from glewis@localhost) by misty.eyesbeyond.com (8.11.6/8.11.6) id h1EMpFQ08228; Sat, 15 Feb 2003 09:21:15 +1030 (CST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Sat, 15 Feb 2003 09:20:59 +1030 From: Greg Lewis To: Huang wen hui Cc: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? Message-ID: <20030215092059.A8186@misty.eyesbeyond.com> References: <3E4C9DDD.4040204@gddsn.org.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3E4C9DDD.4040204@gddsn.org.cn>; from hwh@gddsn.org.cn on Fri, Feb 14, 2003 at 03:42:21PM +0800 X-Spam-Status: No, hits=-3.8 required=8.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_01_02,USER_AGENT, USER_AGENT_MUTT,X_AUTH_WARNING version=2.43 X-Spam-Level: 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 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