This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-1174-g10285c2


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  10285c21134b280457094a6acaa9341862bc65ef (commit)
      from  06c5abbdf81660d1ca99a3b4467f91fb9bca84dd (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10285c21134b280457094a6acaa9341862bc65ef

commit 10285c21134b280457094a6acaa9341862bc65ef
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Jun 15 11:27:51 2012 +0000

    Fix pow (0.0, -Inf) (bug 14241).

diff --git a/ChangeLog b/ChangeLog
index f632292..f066a88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-06-15  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #14241]
+	* sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Use 0.0 instead
+	of ABS(x) in calculating zero to negative powers other than odd
+	integers.
+	* math/libm-test.inc (pow_test): Add more tests.
+
 2012-06-15  Andreas Jaeger  <aj@suse.de>
 
 	* manual/contrib.texi (Contributors): Update entry of Liubov
diff --git a/NEWS b/NEWS
index 91b2644..96b351c 100644
--- a/NEWS
+++ b/NEWS
@@ -29,7 +29,7 @@ Version 2.16
   13963, 13967, 13968, 13970, 13973, 13979, 13983, 13986, 13996, 14012,
   14027, 14033, 14034, 14036, 14040, 14043, 14044, 14048, 14049, 14053,
   14055, 14059, 14064, 14075, 14080, 14083, 14103, 14104, 14109, 14112,
-  14122, 14123, 14134, 14153, 14183, 14188, 14199, 14210, 14218
+  14122, 14123, 14134, 14153, 14183, 14188, 14199, 14210, 14218, 14241
 
 * Support for the x32 ABI on x86-64 added.  The x32 target is selected by
   configuring glibc with:
diff --git a/math/libm-test.inc b/math/libm-test.inc
index d32dde3..8e4d02e 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -6290,6 +6290,8 @@ pow_test (void)
   TEST_ff_f (pow, minus_zero, 11.1L, 0);
   TEST_ff_f (pow, 0, plus_infty, 0);
   TEST_ff_f (pow, minus_zero, plus_infty, 0);
+  TEST_ff_f (pow, 0, minus_infty, plus_infty, DIVIDE_BY_ZERO_EXCEPTION_OK);
+  TEST_ff_f (pow, minus_zero, minus_infty, plus_infty, DIVIDE_BY_ZERO_EXCEPTION_OK);
 
 #ifndef TEST_INLINE
   /* pow (x, +inf) == +inf for |x| > 1.  */
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
index 6c41af9..3fd5e65 100644
--- a/sysdeps/ieee754/dbl-64/e_pow.c
+++ b/sysdeps/ieee754/dbl-64/e_pow.c
@@ -112,12 +112,12 @@ __ieee754_pow(double x, double y) {
     if (((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] != 0)
 	|| (v.i[HIGH_HALF] & 0x7fffffff) > 0x7ff00000)
       return y;
-    if (ABS(y) > 1.0e20) return (y>0)?0:1.0/ABS(x);
+    if (ABS(y) > 1.0e20) return (y>0)?0:1.0/0.0;
     k = checkint(y);
     if (k == -1)
       return y < 0 ? 1.0/x : x;
     else
-      return y < 0 ? 1.0/ABS(x) : 0.0;                               /* return 0 */
+      return y < 0 ? 1.0/0.0 : 0.0;                               /* return 0 */
   }
 
   qx = u.i[HIGH_HALF]&0x7fffffff;  /*   no sign   */

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    8 ++++++++
 NEWS                           |    2 +-
 math/libm-test.inc             |    2 ++
 sysdeps/ieee754/dbl-64/e_pow.c |    4 ++--
 4 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]