From owner-freebsd-i386@FreeBSD.ORG Sun Feb 13 20:00:56 2005 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FBE416A4CE for ; Sun, 13 Feb 2005 20:00:56 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F404243D1D for ; Sun, 13 Feb 2005 20:00:55 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1DK0tKr050629 for ; Sun, 13 Feb 2005 20:00:55 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1DK0tZY050628; Sun, 13 Feb 2005 20:00:55 GMT (envelope-from gnats) Date: Sun, 13 Feb 2005 20:00:55 GMT Message-Id: <200502132000.j1DK0tZY050628@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: David Schultz 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 Reply-To: David Schultz 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 20:00:56 -0000 The following reply was made to PR i386/67469; it has been noted by GNATS. From: David Schultz To: Bruce Evans Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-i386@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: i386/67469: src/lib/msun/i387/s_tan.S gives incorrect results for large inputs Date: Sun, 13 Feb 2005 14:54:33 -0500 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.