From owner-cvs-src@FreeBSD.ORG Fri Oct 24 04:09:25 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62F4616A4B3; Fri, 24 Oct 2003 04:09:25 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7973C43FBF; Fri, 24 Oct 2003 04:09:23 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id VAA13131; Fri, 24 Oct 2003 21:09:14 +1000 Date: Fri, 24 Oct 2003 21:09:13 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= In-Reply-To: Message-ID: <20031024205226.V9644@gamplex.bde.org> References: <200310230820.h9N8KlSD025966@repoman.freebsd.org> <20031024083336.GA10360@VARK.homeunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/msun/src fabsl.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2003 11:09:25 -0000 On Fri, 24 Oct 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > David Schultz writes: > > Cool. This has a minor bug in that it does the wrong thing for -0. I reported this and some style bugs. > I'd like to use your solution[1] instead, but it requires quite a bit > more work as fpmath.h isn't normally installed. Suboptimimal solutions are easy: =09return (x < 0 ? -x : x =3D=3D 0 ? 0 : x); This is about twice as suboptimal as the current version (2 comparisons instead of 1). This also fixes a style bug that I missed before: missing spaces around return value. This is not bug for bug compatible with the fdlibm style, but neither is the current version. Spaces around most binary operators must be omitted for full compatibility. BTW, the classification stuff in gives a lot of namespace pollution in the _ANSI_SOURCE case. is not correctly ifdefed for C99, but it used to be correctly ifdefed for C90. Bruce