Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 25 Apr 2002 11:30:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 25 Apr 2002 11:30:06 -0400 Received: from mark.mielke.cc ([216.209.85.42]:8975 "EHLO mark.mielke.cc") by vger.kernel.org with ESMTP id ; Thu, 25 Apr 2002 11:30:05 -0400 Date: Thu, 25 Apr 2002 11:24:35 -0400 From: Mark Mielke To: "Richard B. Johnson" Cc: rpm , Jesse Pollard , Nikita@Namesys.COM, Andrey Ulanov , linux-kernel@vger.kernel.org Subject: Re: FPU, i386 Message-ID: <20020425112435.A16346@mark.mielke.cc> In-Reply-To: <200204251310.g3PD9dI00738@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 25, 2002 at 10:22:49AM -0400, Richard B. Johnson wrote: > To use the math macros, the comparison should be something like: > if (isless(fabs(a-b), 1.0e-38)) > break; I might be saying something stupid, but, I was under the impression that floating point '==', assuming it follows IEEE rules, does exactly this. I know for certain that it does not do memcmp(), as it has to deal with the exponent and mantissa being each off by +/-1 and <>1 respectively. mark -- mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/