From owner-freebsd-i386@FreeBSD.ORG Sun Feb 13 19:54:40 2005 Return-Path: Delivered-To: freebsd-i386@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92EE816A4CE; Sun, 13 Feb 2005 19:54:40 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3274443D41; Sun, 13 Feb 2005 19:54:40 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.13.1) with ESMTP id j1DJsY8O071288; Sun, 13 Feb 2005 14:54:34 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.13.1/Submit) id j1DJsXu8071287; Sun, 13 Feb 2005 14:54:33 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sun, 13 Feb 2005 14:54:33 -0500 From: David Schultz To: Bruce Evans Message-ID: <20050213195433.GA71214@VARK.MIT.EDU> References: <200406012251.i51MpkkU024224@VARK.homeunix.com> <20040602172105.T23521@gamplex.bde.org> <20050204215913.GA44598@VARK.MIT.EDU> <20050205181808.J10966@delplex.bde.org> <20050209051401.GA18775@VARK.MIT.EDU> <20050209232758.F3249@epsplex.bde.org> <20050210072314.GA26713@VARK.MIT.EDU> <20050214000320.U1866@epsplex.bde.org> <20050213180837.GA70513@VARK.MIT.EDU> <20050214062033.M40410@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050214062033.M40410@delplex.bde.org> cc: FreeBSD-gnats-submit@FreeBSD.ORG cc: freebsd-i386@FreeBSD.ORG cc: bde@FreeBSD.ORG Subject: Re: i386/67469: src/lib/msun/i387/s_tan.S gives incorrect results for large inputs X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 19:54:40 -0000 On Mon, Feb 14, 2005, Bruce Evans wrote: > > sqrt isn't transcendental, so it should be faster and correctly > > rounded on every hardware platform. I found similar results to > > I don't know if we can trust the hardware for that. ISTR checking that > hardware sqrtf gives the same result as fdlibm for possible values for sqrtf. > This is of course impossible for double sqrt. Since IEEE 754 specifies sqrt's behavior, and because ucbtest does a good job of detecting problems with it, hardware designers are likely to pay more attention to getting it right. After all, it's possible to have completely broken transcendentals and still claim IEEE 754 compliance, but you can't do that if your sqrt is broken. > I fixed the bug that gave unbelievable cycle counts: > > %%% > --- r.c~ Mon Feb 14 02:19:34 2005 > +++ r.c Mon Feb 14 02:22:21 2005 > @@ -45,4 +47,5 @@ > tmax = 0; > tmin = INT_MAX; > + total = 0; > for (i = 0; i < ITER; i++) { > if (fabs(avg - t[i]) <= sd * 2) { > %%% Yeah, I noticed that bug while using the program to do some measurements for my research. Sorry I forgot to mention it here.