From owner-freebsd-java Fri Feb 14 15:10:54 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 BFA3337B401 for ; Fri, 14 Feb 2003 15:10:52 -0800 (PST) Received: from h132-197-179-27.gte.com (h132-197-179-27.gte.com [132.197.179.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB09543FA3 for ; Fri, 14 Feb 2003 15:10:51 -0800 (PST) (envelope-from ak03@gte.com) Received: from kanpc.gte.com (localhost [IPv6:::1]) by h132-197-179-27.gte.com (8.12.6/8.12.6) with ESMTP id h1ENAoQa058824; Fri, 14 Feb 2003 18:10:50 -0500 (EST) (envelope-from ak03@kanpc.gte.com) Received: (from ak03@localhost) by kanpc.gte.com (8.12.6/8.12.6/Submit) id h1ENAohx058823; Fri, 14 Feb 2003 18:10:50 -0500 (EST) Date: Fri, 14 Feb 2003 18:10:49 -0500 From: Alexander Kabaev To: Huang wen hui Cc: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? Message-Id: <20030214181049.470647be.ak03@gte.com> In-Reply-To: <3E4C9DDD.4040204@gddsn.org.cn> References: <3E4C9DDD.4040204@gddsn.org.cn> Organization: Verizon Data Services X-Mailer: Sylpheed version 0.8.10claws8 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 What GCC have you used to compile jdk? GCC 3.2.1 from ports had an ABI bug in it which might have the symptoms you are describing. Update your GCC to the latest 3.2.2 version. On Fri, 14 Feb 2003 15:42:21 +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 > > > jdk1.4.1-p2 and jdk1.3.1-p7 do not have this problem. > > --hwh > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message -- Alexander Kabaev To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message