svn commit: r226618 - head/lib/msun/man

David Schultz das at FreeBSD.org
Fri Oct 21 14:24:00 UTC 2011


Author: das
Date: Fri Oct 21 14:23:59 2011
New Revision: 226618
URL: http://svn.freebsd.org/changeset/base/226618

Log:
  Minor corrections and clarifications regarding exceptions.

Modified:
  head/lib/msun/man/fenv.3

Modified: head/lib/msun/man/fenv.3
==============================================================================
--- head/lib/msun/man/fenv.3	Fri Oct 21 14:00:48 2011	(r226617)
+++ head/lib/msun/man/fenv.3	Fri Oct 21 14:23:59 2011	(r226618)
@@ -91,24 +91,35 @@ The following macros expand to bit flags
 representing the five standard floating-point exceptions.
 .Bl -tag -width ".Dv FE_DIVBYZERO"
 .It Dv FE_DIVBYZERO
-A divide-by-zero exception occurs when the program attempts to
-divide a finite non-zero number by zero.
+A divide-by-zero exception occurs when the
+.Em exact
+result of a computation is infinite (according to the limit definition).
+For example, dividing a finite non-zero number by zero or computing
+.Fn log 0
+raises a divide-by-zero exception.
 .It Dv FE_INEXACT
-An inexact exception is raised whenever there is a loss of precision
+An inexact exception is raised whenever there is a loss of accuracy
 due to rounding.
 .It Dv FE_INVALID
 Invalid operation exceptions occur when a program attempts to
 perform calculations for which there is no reasonable representable
 answer.
-For instance, subtraction of infinities, division of zero by zero,
-ordered comparison involving \*(Nas, and taking the square root of a
+For instance, subtraction of like-signed infinities, division of zero by zero,
+ordered comparison involving \*(Nas, and taking the real square root of a
 negative number are all invalid operations.
 .It Dv FE_OVERFLOW
-An overflow exception occurs when the magnitude of the result of a
-computation is too large to fit in the destination type.
+In contrast with divide-by-zero,
+an overflow exception occurs when an infinity is produced because
+the magnitude of the exact result is
+.Em finite
+but too large to fit in the destination type.
+For example, computing
+.Li DBL_MAX * 2
+raises an overflow exception.
 .It Dv FE_UNDERFLOW
-Underflow occurs when the result of a computation is too close to zero
-to be represented as a non-zero value in the destination type.
+Underflow occurs when the result of a computation loses precision
+because it is too close to zero.
+The result is a subnormal number or zero.
 .El
 .Pp
 Additionally, the
@@ -183,9 +194,9 @@ as usual, but no
 .Dv SIGFPE
 signals will be generated as a result.
 Non-stop mode is the default, but it may be altered by
-non-standard mechanisms.
-.\" XXX Mention fe[gs]etmask() here after the interface is finalized
-.\" XXX and ready to be officially documented.
+.Fn feenableexcept
+and
+.Fn fedisableexcept .
 The
 .Fn feupdateenv
 function restores a saved environment similarly to


More information about the svn-src-all mailing list