This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Don't use IGNORE_ZERO_INF_SIGN in hypot tests
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Fri, 3 May 2013 14:41:44 +0000
- Subject: Don't use IGNORE_ZERO_INF_SIGN in hypot tests
libm-test.inc has the IGNORE_ZERO_INF_SIGN facility, to say that an
expected result given as zero or infinity has indeterminate sign.
This is mostly used for complex.h functions where C99/C11 Annex G
explicitly says the sign is indeterminate. However, two tests for
hypot use it as well, and it makes no sense there: hypot (infinity, x)
should always be *positive* infinity, for any x not a signaling NaN;
it never makes sense for hypot to return a negative (non-NaN) result.
This patch removes the bogus uses of IGNORE_ZERO_INF_SIGN. Tested
x86_64 and x86.
2013-05-03 Joseph Myers <joseph@codesourcery.com>
* math/libm-test.inc (hypot_test): Do not use
IGNORE_ZERO_INF_SIGN.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 8feb0a6..343590a 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -9129,8 +9129,8 @@ hypot_test (void)
START (hypot);
- TEST_ff_f (hypot, plus_infty, 1, plus_infty, IGNORE_ZERO_INF_SIGN);
- TEST_ff_f (hypot, minus_infty, 1, plus_infty, IGNORE_ZERO_INF_SIGN);
+ TEST_ff_f (hypot, plus_infty, 1, plus_infty);
+ TEST_ff_f (hypot, minus_infty, 1, plus_infty);
#ifndef TEST_INLINE
TEST_ff_f (hypot, plus_infty, qnan_value, plus_infty);
--
Joseph S. Myers
joseph@codesourcery.com