From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCLbV-0007zr-Se for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCLbU-0007yo-9b for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:52 -0500 Received: from [199.232.76.173] (port=34077 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCLbU-0007yh-64 for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:52 -0500 Received: from hall.aurel32.net ([88.191.82.174]:50121) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCLbT-000062-Gm for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:51 -0500 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LCLbO-0002B9-Tx for qemu-devel@nongnu.org; Mon, 15 Dec 2008 23:07:47 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1LCLbO-0003Sr-4X for qemu-devel@nongnu.org; Mon, 15 Dec 2008 23:07:46 +0100 Date: Mon, 15 Dec 2008 23:07:46 +0100 From: =?iso-8859-15?Q?Aur=E9lien?= Jarno Subject: Re: [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero() Message-ID: <20081215220746.GD8523@volta.aurel32.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, Dec 15, 2008 at 06:48:27PM +0100, Andreas Färber wrote: > Hi, > > Am 15.12.2008 um 18:14 schrieb Aurelien Jarno: > >> Revision: 6050 >> http://svn.sv.gnu.org/viewvc/? >> view=rev&root=qemu&revision=6050 >> Author: aurel32 >> Date: 2008-12-15 17:14:20 +0000 (Mon, 15 Dec 2008) >> >> Log Message: >> ----------- >> fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero() >> >> Signed-off-by: Aurelien Jarno > > Doesn't IEEE 754 have both a positive and a negative zero? > >> +INLINE float32 float32_is_neg(float32 a) >> +{ >> + return a < 0.0; >> +} > > I would assume that 0.0 == -0.0 so this would not indicate a negative > zero as negative. Is that intended? > This is true, however I doubt it will make a difference given the use of this function (for sure it doesn't make any difference given the current use). I have fixed it for the sake of correctness, but the resulting code is now probably slower. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net