In November 2011, I wrote in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-11/msg00069.html>:

   glibc 2.11:   NaN, fenv bit, errno
   MacOS X 10.5: NaN, fenv bit          math_errhandling (always=MATH_ERREXCEPT)
   FreeBSD 6.4:  NaN, fenv bit          math_errhandling (always=MATH_ERREXCEPT)
   OpenBSD 4.9:  NaN
   NetBSD 5.1:   NaN,           errno
   AIX 7.1:      NaN, fenv bit, errno   math_errhandling (always=MATH_ERRNO)
   HP-UX 11.31:  NaN, fenv bit, errno
   IRIX 6.5:     NaN
   OSF/1 5.1:    0,             errno   (<fenv.h> incomplete)
   Solaris 10:   NaN, fenv bit, errno   math_errhandling (always=MATH_ERREXCEPT)
   Cygwin 1.7.9: NaN,           errno
   mingw:        NaN, fenv bit, errno
   MSVC 9:       NaN,           errno

Now I recall that we have a gnulib module 'fpieee', and with this module
the table looks like this:

   glibc 2.11:   NaN, fenv bit, errno
   MacOS X 10.5: NaN, fenv bit          math_errhandling (always=MATH_ERREXCEPT)
   FreeBSD 6.4:  NaN, fenv bit          math_errhandling (always=MATH_ERREXCEPT)
   OpenBSD 4.9:  NaN
   NetBSD 5.1:   NaN,           errno
   AIX 7.1:      NaN, fenv bit, errno   math_errhandling (always=MATH_ERRNO)
   HP-UX 11.31:  NaN, fenv bit, errno
   IRIX 6.5:     NaN
   OSF/1 5.1:    NaN,           errno   (<fenv.h> incomplete)
   Solaris 10:   NaN, fenv bit, errno   math_errhandling (always=MATH_ERREXCEPT)
   Cygwin 1.7.9: NaN,           errno
   mingw:        NaN, fenv bit, errno
   MSVC 9:       NaN,           errno

This means, the most natural way to report exceptional values on all
platforms is through a NaN value. This is simpler to achieve than the
<fenv.h> replacement. I'm going to write unit tests and support for this
convention in the first place.

Bruno


Reply via email to