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.16-ports-merge-763-gc60d3bf
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 22 Nov 2012 15:00:48 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.16-ports-merge-763-gc60d3bf
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 c60d3bf2fa54298f2dcdea1cceda63e0c0b14ae3 (commit)
from ef1e0867c0f6b1a39625f45aa8a8a9d83fe739be (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=c60d3bf2fa54298f2dcdea1cceda63e0c0b14ae3
commit c60d3bf2fa54298f2dcdea1cceda63e0c0b14ae3
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Nov 22 15:00:35 2012 +0000
Fix sign of inexact zero results for ldbl-128ibm fmal.
diff --git a/ChangeLog b/ChangeLog
index ff04e57..dc67044 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-11-22 Joseph Myers <joseph@codesourcery.com>
+ [BZ #14645]
+ * sysdeps/ieee754/ldbl-128ibm/s_fmal.c (__fmal): Compute result as
+ x * y if x and y are nonzero and z is zero.
+
[BZ #14811]
* sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Saturate
nonzero exponents with absolute value below 0x1p-117 to +/-
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_fmal.c b/sysdeps/ieee754/ldbl-128ibm/s_fmal.c
index a868b8d..6706eb2 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_fmal.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Flaherty <flaherty@linux.vnet.ibm.com>.
@@ -29,6 +29,12 @@ __fmal (long double x, long double y, long double z)
if ((finite ((double)x) && finite ((double)y)) && isinf ((double)z))
return (z);
+ /* If z is zero and x are y are nonzero, compute the result
+ as x * y to avoid the wrong sign of a zero result if x * y
+ underflows to 0. */
+ if (z == 0 && x != 0 && y != 0)
+ return x * y;
+
return (x * y) + z;
}
#ifdef IS_IN_libm
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
sysdeps/ieee754/ldbl-128ibm/s_fmal.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources