Date: Tue, 10 Sep 2002 18:10:04 -0700 (PDT) From: "Cox SMTP central" <harry685@cox.net> To: standards@FreeBSD.org Subject: Re: misc/23103: <math.h> lacks many ISO C99 features (NAN, isfinite,...) Message-ID: <200209110110.g8B1A46B029180@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/23103; it has been noted by GNATS. From: "Cox SMTP central" <harry685@cox.net> To: <freebsd-gnats-submit@FreeBSD.org>, <pfeifer@dbai.tuwien.ac.at> Cc: Subject: Re: misc/23103: <math.h> 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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>Why not have an "is()" = function=20 that can do all of this? Here is the x86 source code for=20 is():</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>PROC IS</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>PUSH BP</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>MOV BP,SP</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>FLD = [BP+4]</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>FTST</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>;Get the status = register from the=20 FPU into AX</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>AND = AX,[BP+10]</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>FCOMP</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>POP BP</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>RET</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>ENDP IS</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>And here is the = addition to=20 math.h:</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>int is(double x, int=20 bitmask);</FONT></DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>Lucas=20 Thode</FONT></DIV></BODY></HTML> ------=_NextPart_000_0003_01C25905.200767E0-- 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?200209110110.g8B1A46B029180>