From owner-freebsd-java Sat Feb 15 9:16:53 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 7695237B401 for ; Sat, 15 Feb 2003 09:16:51 -0800 (PST) Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E6B643FAF for ; Sat, 15 Feb 2003 09:16:49 -0800 (PST) (envelope-from shudo@computer.org) Received: from rpsmtp1.aist.go.jp by mx1.aist.go.jp with ESMTP id h1FHGl800768 for ; Sun, 16 Feb 2003 02:16:47 +0900 (JST) env-from (shudo@computer.org) Received: from mail02.aist.go.jp by rpsmtp1.aist.go.jp with ESMTP id h1FHGk018036 for ; Sun, 16 Feb 2003 02:16:46 +0900 (JST) env-from (shudo@computer.org) Received: from aist.go.jp by mail02.aist.go.jp with ESMTP id h1FHGjT12089 for ; Sun, 16 Feb 2003 02:16:45 +0900 (JST) env-from (shudo@computer.org) Date: Sun, 16 Feb 2003 02:16:39 +0900 (JST) Message-Id: <20030216.021639.424242874.shudo@localhost> To: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? From: shudo@computer.org In-Reply-To: <20030216.005020.894433699.shudo@localhost> References: <20030215.175421.1015281127.shudo@localhost> <20030216014802.A10817@misty.eyesbeyond.com> <20030216.005020.894433699.shudo@localhost> X-Mailer: Mew version 2.2 on XEmacs 21.4.8 (Honest Recruiter) 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 > > > It is certain that there is a problem around fdlibm, FreeBSD's gcc > > > 2.95.4 or how the fdlibm compiled (compiler flags?). > > > > Sounds like its quite possibly due to problems with optimisation. > > Obviously, java_g uses no optimisation when compiling, > Next thing we can do to track the cause down is to compile e_pow.c, > w_sqrt.c, e_sqrt.c, s_fabs.c, s_scalbn.c and s_copysign.c with > different compiler options (-O0, -O2 and so on) and see the result of > the ieee754_pow() function. I could confirm that ieee754_pow() in e_pow.c produces wrong results when it is compiled by FreeBSD's GCC 2.95.4 with "-O2" option. If "-O0 -g" is supplied, the function works correctly. This may be a bug of the GCC. Interestingly, GCC 3.2 distributed with Red Hat Linux 8.0 has this bug, too. % gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit Thread model: posix gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) I will summarize a procedure to reproduce this problem. Kazuyuki Shudo shudo@computer.org http://www.shudo.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message