From owner-freebsd-java Sat Feb 15 9: 8:32 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 8A98737B43D for ; Sat, 15 Feb 2003 09:08:29 -0800 (PST) Received: from mgr3.xmission.com (mgr3.xmission.com [198.60.22.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id D967F43F3F for ; Sat, 15 Feb 2003 09:08:28 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: from mail by mgr3.xmission.com with spam-scanned (Exim 3.35 #1) id 18k5ng-000186-03; Sat, 15 Feb 2003 10:08:28 -0700 Received: from [207.135.128.145] (helo=misty.eyesbeyond.com) by mgr3.xmission.com with esmtp (Exim 3.35 #1) id 18k5nf-00015D-03; Sat, 15 Feb 2003 10:08:27 -0700 Received: (from glewis@localhost) by misty.eyesbeyond.com (8.11.6/8.11.6) id h1FH7wB11406; Sun, 16 Feb 2003 03:37:58 +1030 (CST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Sun, 16 Feb 2003 03:37:46 +1030 From: Greg Lewis To: shudo@computer.org Cc: java@FreeBSD.ORG Subject: Re: Math.pow bug for jdk1.3.1-p8 ? Message-ID: <20030216033746.A11387@misty.eyesbeyond.com> References: <3E4C9DDD.4040204@gddsn.org.cn> <20030215.175421.1015281127.shudo@localhost> <20030216014802.A10817@misty.eyesbeyond.com> <20030216.005020.894433699.shudo@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030216.005020.894433699.shudo@localhost>; from shudo@computer.org on Sun, Feb 16, 2003 at 12:50:20AM +0900 X-Spam-Status: No, hits=-3.5 required=8.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,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 Sun, Feb 16, 2003 at 12:50:20AM +0900, shudo@computer.org wrote: > From: Greg Lewis > > On Sat, Feb 15, 2003 at 05:54:21PM +0900, shudo@computer.org wrote: > > > I could confirm __j__ieee754_pow() in libjava.so behaves wrong and one > > > in libjava_g.so works correctly. > > > > > > I also tried writing a test program which calls __j__ieee754_pow() and > > > linked the program with e_pow.o, w_sqrt.o, e_sqrt.o, s_fabs.o, > > > s_scalbn.o and s_copysign.o generated during compilation process of > > > JDK 1.3.1. The program produces the incorrect value (0, not 512). > > > > > > 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, > > I agree with you. To add weight to that argument, it works for me and I compile without having any optimisation set. > 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. It may be good to supply different > options to each source code and identify which source code is badly > affected by optimization. Agreed. I think I'll need to do even more to be honest. If we want optimisation turned on for the binary release I'll have to retest all the maths tests with whatever level of optimisation turned on that we need and track any breakages. > We should report the bug of FreeBSD's gcc 2.95.4 to appropriate > persons if we could recognize the problem is due to the gcc. Definitely. -- 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