This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.18-458-gc5df760
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 28 Nov 2013 16:52:49 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.18-458-gc5df760
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via c5df760908de1ccfd92571864bc44a3d54820ac6 (commit)
from 3c1c46a64ad1037d616ec39514c4e55133997c9f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c5df760908de1ccfd92571864bc44a3d54820ac6
commit c5df760908de1ccfd92571864bc44a3d54820ac6
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Nov 28 16:52:36 2013 +0000
Document some libm error handling intents.
diff --git a/ChangeLog b/ChangeLog
index 16aa48a..3793b1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2013-11-28 Joseph Myers <joseph@codesourcery.com>
+ * manual/arith.texi (FP Exceptions): Document that exceptions may
+ not be raised when matherr is used.
+ (Math Error Reporting): Document overflow in directed rounding
+ modes. Document that errno may not be set when finite values are
+ returned on overflow. Document intent to set errno on underflow
+ only for underflow to zero.
+
[BZ #16271]
* sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Set
round-to-nearest then adjust result for other rounding modes.
diff --git a/manual/arith.texi b/manual/arith.texi
index 85aa197..9cd6127 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -497,7 +497,8 @@ In the System V math library, the user-defined function @code{matherr}
is called when certain exceptions occur inside math library functions.
However, the Unix98 standard deprecates this interface. We support it
for historical compatibility, but recommend that you do not use it in
-new programs.
+new programs. When this interface is used, exceptions may not be
+raised.
@noindent
The exceptions defined in @w{IEEE 754} are:
@@ -806,7 +807,8 @@ an integer. Do not attempt to modify an @code{fexcept_t} variable.
Many of the math functions are defined only over a subset of the real or
complex numbers. Even if they are mathematically defined, their result
may be larger or smaller than the range representable by their return
-type. These are known as @dfn{domain errors}, @dfn{overflows}, and
+type without loss of accuracy. These are known as @dfn{domain errors},
+@dfn{overflows}, and
@dfn{underflows}, respectively. Math functions do several things when
one of these errors occurs. In this manual we will refer to the
complete response as @dfn{signalling} a domain error, overflow, or
@@ -816,11 +818,20 @@ When a math function suffers a domain error, it raises the invalid
exception and returns NaN. It also sets @var{errno} to @code{EDOM};
this is for compatibility with old systems that do not support @w{IEEE
754} exception handling. Likewise, when overflow occurs, math
-functions raise the overflow exception and return @math{@infinity{}} or
-@math{-@infinity{}} as appropriate. They also set @var{errno} to
-@code{ERANGE}. When underflow occurs, the underflow exception is
-raised, and zero (appropriately signed) is returned. @var{errno} may be
-set to @code{ERANGE}, but this is not guaranteed.
+functions raise the overflow exception and, in the default rounding
+mode, return @math{@infinity{}} or @math{-@infinity{}} as appropriate
+(in other rounding modes, the largest finite value of the appropriate
+sign is returned when appropriate for that rounding mode). They also
+set @var{errno} to @code{ERANGE} if returning @math{@infinity{}} or
+@math{-@infinity{}}; @var{errno} may or may not be set to
+@code{ERANGE} when a finite value is returned on overflow. When
+underflow occurs, the underflow exception is raised, and zero
+(appropriately signed) or a subnormal value, as appropriate for the
+mathematical result of the function and the rounding mode, is
+returned. @var{errno} may be set to @code{ERANGE}, but this is not
+guaranteed; it is intended that @theglibc{} should set it when the
+underflow is to an appropriately signed zero, but not necessarily for
+other underflows.
Some of the math functions are defined mathematically to result in a
complex value over parts of their domains. The most familiar example of
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
manual/arith.texi | 25 ++++++++++++++++++-------
2 files changed, 25 insertions(+), 7 deletions(-)
hooks/post-receive
--
GNU C Library master sources