GNU C Library master sources branch master updated. glibc-2.28.9000-197-gc2b7cca
Wed Oct 17 21:24:00 GMT 2018

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  c2b7ccad93d6361eba91755e8f0c92e97c76e854 (commit)
      from  26756e57563e7656e756c0451166e5cd56a5a3cf (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 -----------------------------------------------------------------;a=commitdiff;h=c2b7ccad93d6361eba91755e8f0c92e97c76e854

commit c2b7ccad93d6361eba91755e8f0c92e97c76e854
Author: Joseph Myers <>
Date:   Wed Oct 17 21:23:40 2018 +0000

    Do not allow divide-by-zero exception for pow(+/- 0, -Inf).
    C99 wrongly specified a divide-by-zero exception for pow(+/- 0, -Inf);
    C11 made it optional after this was pointed out, and the permission
    for this exception has been removed in the current C2x draft.  This
    patch makes the glibc pow tests reflect the stricter requirement
    (which follows the normal IEEE rules that a divide-by-zero exception
    is for the case of exact infinite results from *finite* operands, not
    for such results when any operand is infinite).
    Tested for x86_64 and x86.  (If any other pow implementation in glibc,
    not exercised on those architectures, turns out to fail the stricter
    test, it should be fixed to avoid the exception in this case.)
    	* math/ (pow_test_data): Do not allow
    	divide-by-zero exception for pow(+/- 0, -Inf).

diff --git a/ChangeLog b/ChangeLog
index 7dea006..450732e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-17  Joseph Myers  <>
+	* math/ (pow_test_data): Do not allow
+	divide-by-zero exception for pow(+/- 0, -Inf).
 2018-10-17  Zack Weinberg  <>
 	* manual/job.texi (Job Control is Optional): Remove node, as
diff --git a/math/ b/math/
index ff20ad2..c7b91c1 100644
--- a/math/
+++ b/math/
@@ -248,8 +248,13 @@ static const struct test_ff_f_data pow_test_data[] =
     TEST_ff_f (pow, 0, plus_infty, 0, ERRNO_UNCHANGED),
     TEST_ff_f (pow, minus_zero, plus_infty, 0, ERRNO_UNCHANGED),
-    TEST_ff_f (pow, 0, minus_infty, plus_infty, DIVIDE_BY_ZERO_EXCEPTION_OK|ERRNO_UNCHANGED),
-    TEST_ff_f (pow, minus_zero, minus_infty, plus_infty, DIVIDE_BY_ZERO_EXCEPTION_OK|ERRNO_UNCHANGED),
+    /* C99 erroneously specified a divide-by-zero exception here,
+       which is not permitted in C2x (C11 specified it as optional).
+       See <>
+       and
+       <>.  */
+    TEST_ff_f (pow, 0, minus_infty, plus_infty, ERRNO_UNCHANGED),
+    TEST_ff_f (pow, minus_zero, minus_infty, plus_infty, ERRNO_UNCHANGED),
     /* pow (x, +inf) == +inf for |x| > 1.  */
     TEST_ff_f (pow, 1.5, plus_infty, plus_infty, ERRNO_UNCHANGED|NO_TEST_INLINE),


Summary of changes:
 ChangeLog              |    5 +++++
 math/ |    9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

GNU C Library master sources

More information about the Glibc-cvs mailing list