delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/10/26/13:30:57

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: Kbwms AT aol DOT com
Message-ID: <12c.33e8fcb8.2ccd6cca@aol.com>
Date: Sun, 26 Oct 2003 13:30:34 EST
Subject: Re: Clash between math.h and ieeefp.h [PATCH]
To: djgpp-workers AT delorie DOT com
MIME-Version: 1.0
X-Mailer: 8.0 for Windows sub 6021
Reply-To: djgpp-workers AT delorie DOT com

--part1_12c.33e8fcb8.2ccd6cca_boundary
Content-Type: multipart/alternative;
	boundary="part1_12c.33e8fcb8.2ccd6cca_alt_boundary"


--part1_12c.33e8fcb8.2ccd6cca_alt_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

In a message dated 10/26/2003 12:24:54 PM Eastern Standard Time, 
eliz AT elta DOT co DOT il writes:

> If isnan is supposed to be a function as well as a macro (not unlike
> the ctype macros) and is described like that by some standard, then we
> will need this trick anyway.
> 


As nearly as I can determine, it is a macro only according to the standard.  
See paragraph 7.12.3.4 of ISO/IEC 9899:1999 (E) for which a manual page, 
retrieved from, <A HREF="http://www.opengroup.org/onlinepubs/007904975/toc.htm">http://www.opengroup.org/onlinepubs/007904975/toc.htm</A>
is attached.

However, the code in /djgpp/src/libm/math makes liberal use of the Cygnus 
versions of functions isnan() and isnanf().

--part1_12c.33e8fcb8.2ccd6cca_alt_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<HTML><FONT FACE=3Darial,helvetica><FONT  SIZE=3D3 FAMILY=3D"SERIF" FACE=3D"=
Georgia" LANG=3D"0">In a message dated 10/26/2003 12:24:54 PM Eastern Standa=
rd Time, eliz AT elta DOT co DOT il writes:<BR>
<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"></FONT><FONT  COLOR=3D"#000000"=
 style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=3D"A=
rial" LANG=3D"0">If isnan is supposed to be a function as well as a macro (n=
ot unlike<BR>
the ctype macros) and is described like that by some standard, then we<BR>
will need this trick anyway.<BR>
</BLOCKQUOTE><BR>
</FONT><FONT  COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D3=
 FAMILY=3D"SERIF" FACE=3D"Georgia" LANG=3D"0"><BR>
<BR>
As nearly as I can determine, it is a macro only according to the standard.&=
nbsp; See paragraph 7.12.3.4 of ISO/IEC 9899:1999 (E) for which a manual pag=
e, retrieved from, <A HREF=3D"http://www.opengroup.org/onlinepubs/007904975/=
toc.htm">http://www.opengroup.org/onlinepubs/007904975/toc.htm</A><BR>
is attached.<BR>
<BR>
However, the code in /djgpp/src/libm/math makes liberal use of the Cygnus ve=
rsions of functions isnan() and isnanf().</FONT></HTML>

--part1_12c.33e8fcb8.2ccd6cca_alt_boundary--

--part1_12c.33e8fcb8.2ccd6cca_boundary
Content-Type: text/plain; name="isnan_wu.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; filename="isnan_wu.txt"

=09 The Open Group Base Specifications Issue 6
IEEE Std 1003.1, 2003 Edition
Copyright =A9 2001-2003 The IEEE and The Open Group, All Rights reserved.

----------------------------------------------------------------------------=
----

NAME
isnan - test for a NaN
SYNOPSIS
#include <math.h>

int isnan(real-floating x);


DESCRIPTION
[CX]  The functionality described on this reference page is aligned with the=
=20
ISO C standard. Any conflict between the requirements described here and the=
=20
ISO C standard is unintentional. This volume of IEEE Std 1003.1-2001 defers=20=
to
the ISO C standard.=20

The isnan() macro shall determine whether its argument value is a NaN.=20
First, an argument represented in a format wider than its semantic type is=20
converted to its semantic type. Then determination is based on the type of t=
he=20
argument.

RETURN VALUE
The isnan() macro shall return a non-zero value if and only if its argument=20=
has=20
a NaN value.

ERRORS
No errors are defined.


----------------------------------------------------------------------------=
----

The following sections are informative.
EXAMPLES
None.

APPLICATION USAGE
None.

RATIONALE
None.

FUTURE DIRECTIONS
None.

SEE ALSO
fpclassify() , isfinite() , isinf() , isnormal() , signbit() ,=20
the Base Definitions volume of IEEE Std 1003.1-2001, <math.h>

CHANGE HISTORY
First released in Issue 3.

Issue 5
The DESCRIPTION is updated to indicate the return value when NaN is not=20
supported. This text was previously published in the APPLICATION USAGE secti=
on.

Issue 6
Re-written for alignment with the ISO/IEC 9899:1999 standard.

End of informative text.

----------------------------------------------------------------------------=
----

----------------------------------------------------------------------------=
----

UNIX =AE is a registered Trademark of The Open Group.
POSIX =AE is a registered Trademark of The IEEE.
[ Main Index | XBD | XCU | XSH | XRAT ]
----------------------------------------------------------------------------=
----


--part1_12c.33e8fcb8.2ccd6cca_boundary--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019