Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2003 01:40:17 +0100 (CET)
From:      Lukas Ertl <l.ertl@univie.ac.at>
To:        David Schultz <dschultz@uclink.Berkeley.EDU>
Cc:        standards@FreeBSD.ORG
Subject:   Re: C99 floating point macros
Message-ID:  <20030209013955.U355@leelou.in.tern>
In-Reply-To: <20030209003350.GA20683@HAL9000.homeunix.com>
References:  <20030207194848.N353@leelou.in.tern> <20030208112619.GA15718@HAL9000.homeunix.com> <20030208130529.C355@leelou.in.tern> <20030209003350.GA20683@HAL9000.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030209013955.U355>