No subject

Fred Tydeman sun!uunet.UU.NET!ibmsupt!ibmpa!tydeman
Wed Sep 12 08:37:25 PDT 1990


Subject: How is NCEG going to resolve this conflict...
 
Last December, when I looked into the different standards, I found the
following philosophies on error handling in the math library.
 
For example, what is sqrt(-1.0) in a "C" program?
 
 1) Return implementation-defined value and set  errno to EDOM -- IEEE
    POSIX and ANSI "C" standards.
 2) Invalid operation exception:   trap or return a QNaN  (Quiet Not a
    Number) -- IEEE 754 and IEEE 854 Floating-Point Standards.
 3) Returns 0.0  and set errno to  EDOM.  A message  indicating DOMAIN
    error   is  printed   on  the   standard  error   output.     This
    error-handling procedure may be changed with the matherr() routine
    -- ATT SVID.
 4) Either  zero is  returned and  errno is  set  to EDOM,  or NaN  is
    returned and errno may be set to EDOM -- X/OPEN.
 5) Sets errno to EDOM and on a  DEC VAX returns the reserved operand.
    This error-handling  procedure may  be changed  with the  infnan()
    routine -- BSD 4.3
 6) Return 0.0 and set errno to EDOM -- IBM's SAA.
 



More information about the Numeric-interest mailing list