From owner-svn-src-all@FreeBSD.ORG Fri Oct 21 14:24:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1319E1065670; Fri, 21 Oct 2011 14:24:00 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCE038FC0A; Fri, 21 Oct 2011 14:23:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LENx0X028135; Fri, 21 Oct 2011 14:23:59 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LENxv2028133; Fri, 21 Oct 2011 14:23:59 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110211423.p9LENxv2028133@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 14:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226618 - head/lib/msun/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 14:24:00 -0000 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