From owner-freebsd-standards Sat Feb 8 16:40:30 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B26FD37B401 for ; Sat, 8 Feb 2003 16:40:29 -0800 (PST) Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A41543F75 for ; Sat, 8 Feb 2003 16:40:28 -0800 (PST) (envelope-from l.ertl@univie.ac.at) Received: from adslle.cc.univie.ac.at (adslle.cc.univie.ac.at [131.130.102.11]) by mailbox.univie.ac.at (8.12.2/8.12.2) with ESMTP id h190eHt3223056; Sun, 9 Feb 2003 01:40:21 +0100 Date: Sun, 9 Feb 2003 01:40:17 +0100 (CET) From: Lukas Ertl To: David Schultz Cc: standards@FreeBSD.ORG Subject: Re: C99 floating point macros In-Reply-To: <20030209003350.GA20683@HAL9000.homeunix.com> Message-ID: <20030209013955.U355@leelou.in.tern> References: <20030207194848.N353@leelou.in.tern> <20030208112619.GA15718@HAL9000.homeunix.com> <20030208130529.C355@leelou.in.tern> <20030209003350.GA20683@HAL9000.homeunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-DCC-ZID-Univie-Metrics: mx1 4261; Body=2 Fuz1=2 Fuz2=2 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 8 Feb 2003, David Schultz wrote: > Hmm...why not just use some macros, like this? > > #define=09isgreater(x, y)=09=09(!isunordered((x), (y)) && (x) > (y)) > #define=09isgreaterequal(x, y)=09(!isunordered((x), (y)) && (x) >=3D (y)) > #define=09isless(x, y)=09=09(!isunordered((x), (y)) && (x) < (y)) > #define=09islessequal(x, y)=09(!isunordered((x), (y)) && (x) <=3D (y)) > #define=09islessgreater(x, y)=09(!isunordered((x), (y)) && \ > =09=09=09=09=09((x) > (y) || (y) > (x))) > #define=09isunordered(x, y)=09(isnan(x) || isnan(y)) Ok, this is a whole lot simpler :-) regards, le --=20 Lukas Ertl eMail: l.ertl@univie.ac.at UNIX-Systemadministrator Tel.: (+43 1) 4277-14073 Zentraler Informatikdienst (ZID) Fax.: (+43 1) 4277-9140 der Universit=E4t Wien http://mailbox.univie.ac.at/~le/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message