From owner-freebsd-standards Tue Sep 10 18:10:11 2002 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 B694037B400 for ; Tue, 10 Sep 2002 18:10:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56E5843E42 for ; Tue, 10 Sep 2002 18:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g8B1A4JU029181 for ; Tue, 10 Sep 2002 18:10:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g8B1A46B029180; Tue, 10 Sep 2002 18:10:04 -0700 (PDT) Date: Tue, 10 Sep 2002 18:10:04 -0700 (PDT) Message-Id: <200209110110.g8B1A46B029180@freefall.freebsd.org> To: standards@FreeBSD.org Cc: From: "Cox SMTP central" Subject: Re: misc/23103: lacks many ISO C99 features (NAN, isfinite,...) Reply-To: "Cox SMTP central" 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 The following reply was made to PR misc/23103; it has been noted by GNATS. From: "Cox SMTP central" To: , Cc: Subject: Re: misc/23103: lacks many ISO C99 features (NAN, isfinite,...) Date: Tue, 10 Sep 2002 20:03:26 -0500 This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C25905.200767E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Why not have an "is()" function that can do all of this? Here is the = x86 source code for is(): PROC IS PUSH BP MOV BP,SP FLD [BP+4] FTST ;Get the status register from the FPU into AX AND AX,[BP+10] FCOMP POP BP RET ENDP IS And here is the addition to math.h: int is(double x, int bitmask); Lucas Thode ------=_NextPart_000_0003_01C25905.200767E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Why not have an "is()" = function=20 that can do all of this?  Here is the x86 source code for=20 is():
 
PROC IS
PUSH BP
MOV BP,SP
FLD = [BP+4]
FTST
;Get the status = register from the=20 FPU into AX
AND = AX,[BP+10]
FCOMP
POP BP
RET
ENDP IS
 
And here is the = addition to=20 math.h:
 
int is(double x, int=20 bitmask);
 
Lucas=20 Thode
------=_NextPart_000_0003_01C25905.200767E0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message