Mark some clog / clog10 underflows as expected for IBM long double

Joseph S. Myers joseph@codesourcery.com
Wed Nov 21 22:31:00 GMT 2012


As I noted in
<http://sourceware.org/ml/libc-alpha/2012-11/msg00461.html>, some clog
/ clog10 tests have underflows shown as unexpected, that actually are
not spurious because the imaginary parts of the results are in the
subnormal range for IBM long double.  This patch marks the tests in
question with UNDERFLOW_EXCEPTION_LDOUBLE_IBM.

Tested that this eliminates the spurious errors on powerpc.

2012-11-21  Joseph Myers  <joseph@codesourcery.com>

	* math/libm-test.inc (clog_test): Use
	UNDERFLOW_EXCEPTION_LDOUBLE_IBM on two tests.
	(clog10_test): Likewise.

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 2a60557..74ef15b 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -2518,12 +2518,12 @@ clog_test (void)
 #endif
 #if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
   TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-60L, 9.868649107778739757272772275265050767867e-19L, 9.868649106423871142816660980898339912137e-19L);
-  TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 9.868649107778739752403260515979017248596e-19L, 1.061846605795612822522063052130030717368e-301L);
+  TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 9.868649107778739752403260515979017248596e-19L, 1.061846605795612822522063052130030717368e-301L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM);
 #endif
 
   TEST_c_c (clog, 0x0.ffffffp0L, 0x0.ffffffp-100L, -5.960464655174753498633255797994360530379e-8L, 7.888609052210118054117285652827862296732e-31L);
 #ifndef TEST_FLOAT
-  TEST_c_c (clog, 0x0.fffffffffffff8p0L, 0x0.fffffffffffff8p-1000L, -1.110223024625156602053389888482372171810e-16L, 9.332636185032188789900895447238171696171e-302L);
+  TEST_c_c (clog, 0x0.fffffffffffff8p0L, 0x0.fffffffffffff8p-1000L, -1.110223024625156602053389888482372171810e-16L, 9.332636185032188789900895447238171696171e-302L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM);
 #endif
 #if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
   TEST_c_c (clog, 0x0.ffffffffffffffffp0L, 0x0.ffffffffffffffffp-15000L, -5.421010862427522170184200798202494495630e-20L, 3.548665303440282824232502561095699343814e-4516L);
@@ -2738,12 +2738,12 @@ clog10_test (void)
 #endif
 #if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
   TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-60L, 4.285899851347756188767674032946882584784e-19L, 4.285899850759344225805480528847018395861e-19L);
-  TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 4.285899851347756186652871946325962330640e-19L, 4.611541215247321502041995872887317363241e-302L);
+  TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 4.285899851347756186652871946325962330640e-19L, 4.611541215247321502041995872887317363241e-302L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM);
 #endif
 
   TEST_c_c (clog10, 0x0.ffffffp0L, 0x0.ffffffp-100L, -2.588596909321764128428416045209904492216e-8L, 3.425979381266895667295625489912064603415e-31L);
 #ifndef TEST_FLOAT
-  TEST_c_c (clog10, 0x0.fffffffffffff8p0L, 0x0.fffffffffffff8p-1000L, -4.821637332766435821255375046554377090472e-17L, 4.053112396770095089737411317782466262176e-302L);
+  TEST_c_c (clog10, 0x0.fffffffffffff8p0L, 0x0.fffffffffffff8p-1000L, -4.821637332766435821255375046554377090472e-17L, 4.053112396770095089737411317782466262176e-302L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM);
 #endif
 #if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
   TEST_c_c (clog10, 0x0.ffffffffffffffffp0L, 0x0.ffffffffffffffffp-15000L, -2.354315103889861110220423157644627849164e-20L, 1.541165759405643564697852372112893034397e-4516L);

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list