This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Don't call feclearexcept in gamma function tests
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Wed, 17 Oct 2012 23:45:02 +0000
- Subject: Don't call feclearexcept in gamma function tests
The gamma function tests in libm-test.inc call feclearexcept after
testing for availability of the function; none of the tests of other
functions do this. There is no need for such a call, since the START
call in each test function generates (in gen-libm-test.pl) a call to
init_max_error, which calls feclearexcept (FE_ALL_EXCEPT) itself.
This patch makes these three test functions match all the others and
not call feclearexcept. Tested x86_64 and committed as obvious.
2012-10-17 Joseph Myers <joseph@codesourcery.com>
* math/libm-test.inc (gamma_test): Do not call feclearexcept.
(lgamma_test): Likewise.
(tgamma_test): Likewise.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 0422e8e..e828fc2 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -5015,7 +5015,6 @@ gamma_test (void)
if (errno == ENOSYS)
/* Function not implemented. */
return;
- feclearexcept (FE_ALL_EXCEPT);
START (gamma);
@@ -5531,7 +5530,6 @@ lgamma_test (void)
if (errno == ENOSYS)
/* Function not implemented. */
return;
- feclearexcept (FE_ALL_EXCEPT);
START (lgamma);
@@ -9346,7 +9344,6 @@ tgamma_test (void)
if (errno == ENOSYS)
/* Function not implemented. */
return;
- feclearexcept (FE_ALL_EXCEPT);
START (tgamma);
--
Joseph S. Myers
joseph@codesourcery.com