delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/10/28/09:54:20

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: Kbwms AT aol DOT com
Message-ID: <182.22490ddc.2ccfdd07@aol.com>
Date: Tue, 28 Oct 2003 09:53:59 EST
Subject: Re: C99 Functions Under Development and Checkout
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_182.22490ddc.2ccfdd07_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

A continuing problem that should be solved soon is not knowing what to do in 
the math functions when an error occurs.  All function specifications at

<A HREF="http://www.opengroup.org/onlinepubs/007904975/toc.htm">http://www.opengroup.org/onlinepubs/007904975/toc.htm</A>

contain the following text:

     On error, the expressions (math_errhandling & MATH_ERRNO) and 
     (math_errhandling & MATH_ERREXCEPT) are independent of each 
     other, but at least one of them must be non-zero.

At the moment, every function assumes that both expressions are non-zero 
because neither 'math-errhandling' nor 'MATH_ERREXCEPT' is defined.

My intention is to implement the aforementioned variables and modify all 
existing code to check those expressions.  At the beginning, both expressions will 
be non-zero.

Appended to this email as a postscript are specifications taken from math.h 
at the linkage given above.


Is this the desired behavior?


KB Williams


PS



> The following macros shall expand to the integer constants 1 and 2, 
> respectively;
> 
> 
> >> MATH_ERRNO
>> MATH_ERREXCEPT
>> 
> 
> The following macro shall expand to an expression that has type int and the 
> value MATH_ERRNO, MATH_ERREXCEPT, or the bitwise-inclusive OR of both:
> >> math_errhandling
>> 
> 
> The value of math_errhandling is constant for the duration of the program. 
> It is unspecified whether math_errhandling is a macro or an identifier with 
> external linkage. If a macro definition is suppressed or a program defines an 
> identifier with the name math_errhandling, the behavior is undefined. If the 
> expression (math_errhandling & MATH_ERREXCEPT) can be non-zero, the 
> implementation shall define the macros FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW in <A HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/fenv.h.html">.

--part1_182.22490ddc.2ccfdd07_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">A continuing problem that should be solved soon is not k=
nowing what to do in the math functions when an error occurs.&nbsp; All func=
tion specifications at<BR>
<BR>
<A HREF=3D"http://www.opengroup.org/onlinepubs/007904975/toc.htm">http://www=
.opengroup.org/onlinepubs/007904975/toc.htm</A><BR>
<BR>
contain the following text:<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp; On error, the expressions (math_errhandling &amp; M=
ATH_ERRNO) and <BR>
&nbsp;&nbsp;&nbsp;&nbsp; (math_errhandling &amp; MATH_ERREXCEPT) are indepen=
dent of each <BR>
&nbsp;&nbsp;&nbsp;&nbsp; other, but at least one of them must be non-zero.<B=
R>
<BR>
At the moment, every function assumes that both expressions are non-zero bec=
ause neither 'math-errhandling' nor 'MATH_ERREXCEPT' is defined.<BR>
<BR>
My intention is to implement the aforementioned variables and modify all exi=
sting code to check those expressions.&nbsp; At the beginning, both expressi=
ons will be non-zero.<BR>
<BR>
Appended to this email as a postscript are specifications taken from math.h=20=
at the linkage given above.<BR>
<BR>
<BR>
Is this the desired behavior?<BR>
<BR>
<BR>
KB Williams<BR>
<BR>
<BR>
PS<BR>
<BR>
<BR>
</FONT><FONT  COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2=
 FAMILY=3D"SANSSERIF" FACE=3D"Arial" LANG=3D"0"><BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">The following macros shall expa=
nd to the integer constants 1 and 2, respectively;<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">MATH_ERRNO<BR>
MATH_ERREXCEPT<BR>
</BLOCKQUOTE><BR>
<BR>
The following macro shall expand to an expression that has type <B>int</B> a=
nd the value MATH_ERRNO, MATH_ERREXCEPT, or the bitwise-inclusive OR of both=
:<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">math_errhandling<BR>
</BLOCKQUOTE><BR>
<BR>
The value of math_errhandling is constant for the duration of the program. I=
t is unspecified whether math_errhandling is a macro or an identifier with e=
xternal linkage. If a macro definition is suppressed or a program defines an=
 identifier with the name math_errhandling, the behavior is undefined. If th=
e expression (math_errhandling &amp; MATH_ERREXCEPT) can be non-zero, the im=
plementation shall define the macros FE_DIVBYZERO, FE_INVALID, and FE_OVERFL=
OW in <I><A HREF=3D"http://www.opengroup.org/onlinepubs/007904975/basedefs/f=
env.h.html"><fenv.h&gt;</A></I></I>.</BLOCKQUOTE><BR>
</FONT></HTML>
--part1_182.22490ddc.2ccfdd07_boundary--

- Raw text -


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