X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f From: Kbwms AT aol DOT com Message-ID: Date: Sat, 8 Nov 2003 12:36:38 EST Subject: Re: C99 Functions Under Development and Checkout To: djgpp-workers AT delorie DOT com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="part1_a.380a1f62.2cde83a6_boundary" X-Mailer: 8.0 for Windows sub 6021 Reply-To: djgpp-workers AT delorie DOT com --part1_a.380a1f62.2cde83a6_boundary Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Rich Dawe: In a message dated 11/8/2003 7:09:46 AM Eastern Standard Time, rich AT phekda DOT freeserve DOT co DOT uk writes: > Do the maths functions use get_math_errhandling, to get the value of > math_errhandling? Or do they just read math_errhandling? If they look at > math_errhandling, then get_math_errhandling is useless. The library user > could > modify math_errhandling, making the value returned by get_math_errhandling > completely bogus. > Functions get_math_errhandling() and set_math_errhandling() are meant to be used by external programs. For example, the test programs in the cygnus subdirectory will probably call set_math_errhandling() with MATH_ERRNO as a parameter. The only way to retrieve the original value of math_errhandling is through get_math_errhandling(). The global variable math_errhandling can be set exactly once during the life of the program. Thereafter, it cannot be reset; any attempt to do so at runtime either by resetting the global variable or by calling set_math_errhandling() again will fail. The math functions use the other two functions, raise_except() and set_errno(). Each call to these functions will freshen the original value of math_errhandling. The code tells the story. It should have been attached to your email. KB Williams --part1_a.380a1f62.2cde83a6_boundary Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Rich Dawe:

In a message dated 11/8/2003 7:09:46 AM Eastern Standard Time, rich AT phekda DOT f= reeserve.co.uk writes:

Do the maths functions use get_math_errhandling, to get the= value of
math_errhandling? Or do they just read math_errhandling? If they look at
math_errhandling, then get_math_errhandling is useless. The library user cou= ld
modify math_errhandling, making the value returned by get_math_errhandling completely bogus.


Functions get_math_errhandling() and set_math_errhandling() are meant to be=20= used by external programs.  For example, the test programs in the cygnu= s subdirectory will probably call set_math_errhandling() with MATH_ERRNO as=20= a parameter.

The only way to retrieve the original value of math_errhandling is through g= et_math_errhandling().  The global variable math_errhandling can be set= exactly once during the life of the program.  Thereafter, it cannot be= reset; any attempt to do so at runtime either by resetting the global varia= ble or by calling set_math_errhandling() again will fail. 

The math functions use the other two functions, raise_except() and set_errno= ().  Each call to these functions will freshen the original value of ma= th_errhandling.

The code tells the story.  It should have been attached to your email.<= BR>
KB Williams
--part1_a.380a1f62.2cde83a6_boundary--