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-765-g0a42601
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 22 Nov 2012 19:57:03 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.16-ports-merge-765-g0a42601
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 0a42601f272ea962b200d452a54e0ca374163f60 (commit)
from 79c9b9feb45d175d4a394edd9ecf89cde97890c4 (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=0a42601f272ea962b200d452a54e0ca374163f60
commit 0a42601f272ea962b200d452a54e0ca374163f60
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Nov 22 19:56:47 2012 +0000
Fix ldbl-128ibm atanl spurious underflows (bug 14871).
diff --git a/ChangeLog b/ChangeLog
index 4a6eee2..56c1af1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-11-22 Joseph Myers <joseph@codesourcery.com>
+ [BZ #14871]
+ * sysdeps/ieee754/ldbl-128ibm/s_atanl.c (__atanl): Return the
+ input for small inputs. Return +/- pi/2 for large inputs.
+ * math/libm-test.inc (atan_test): Add more tests.
+
* sysdeps/generic/unwind-dw2-fde-glibc.c
(_Unwind_IteratePhdrCallback): Declare P_DYNAMIC with
__attribute__ ((unused)).
diff --git a/NEWS b/NEWS
index 51de010..e8c44ad 100644
--- a/NEWS
+++ b/NEWS
@@ -21,7 +21,7 @@ Version 2.17
14638, 14645, 14648, 14652, 14660, 14661, 14669, 14672, 14683, 14694,
14716, 14719, 14743, 14767, 14783, 14784, 14785, 14793, 14796, 14797,
14801, 14805, 14807, 14809, 14811, 14815, 14821, 14822, 14824, 14828,
- 14831, 14835, 14838, 14856, 14863, 14865, 14866, 14868, 14869.
+ 14831, 14835, 14838, 14856, 14863, 14865, 14866, 14868, 14869, 14871.
* Port to ARM AArch64 contributed by Linaro.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index b96f1bf..cae2de4 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -1195,6 +1195,14 @@ atan_test (void)
TEST_f_f (atan, 0.75L, 0.643501108793284386802809228717322638L);
+ TEST_f_f (atan, 0x1p-100L, 0x1p-100L);
+#ifndef TEST_FLOAT
+ TEST_f_f (atan, 0x1p-600L, 0x1p-600L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+ TEST_f_f (atan, 0x1p-10000L, 0x1p-10000L);
+#endif
+
END (atan);
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_atanl.c b/sysdeps/ieee754/ldbl-128ibm/s_atanl.c
index 779209d..2a36d16 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_atanl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_atanl.c
@@ -199,6 +199,22 @@ __atanl (long double x)
return atantbl[83];
}
+ if (k <= 0x3c800000) /* |x| <= 2**-55. */
+ {
+ /* Raise inexact. */
+ if (1e300L + x > 0.0)
+ return x;
+ }
+
+ if (k >= 0x46c00000) /* |x| >= 2**109. */
+ {
+ /* Saturate result to {-,+}pi/2. */
+ if (sign)
+ return -atantbl[83];
+ else
+ return atantbl[83];
+ }
+
if (sign)
x = -x;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
NEWS | 2 +-
math/libm-test.inc | 8 ++++++++
sysdeps/ieee754/ldbl-128ibm/s_atanl.c | 16 ++++++++++++++++
4 files changed, 30 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources