This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PowerPC libm-test.inc expl(1000.0L) result exceeds __LDBL_MAX__ for IBM Long Double 128.


The result of the libm-test.inc test_expl() function's expl(1000.0L)
test exceeds the value of __LDBL_MAX__ for IBM Long Double 128.

GCC 4.3 is more pedantic than GCC 4.1 and throws out a warning as an
error when storing the constant return value causing a make check
failure.  The same warning as an error is generated with GCC 4.1 when it
is compiled with the -pedantic flag.

The following test should be excluded on PowerPC to prevent make check
failures.

TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L);

The following patch excludes it on PowerPC by testing against
__LDBL_MAX_EXP__ since one can't test against floating point values in
pre-processor directives.

Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development


2008-02-20  Ryan S. Arnold  <rsa@us.ibm.com>

	* math/libm-test.inc (exp_test): Exclude expl(1000.0L) from being
	executed on PowerPC as the expected result exceeds IBM Long Double 128
	__LDBL_MAX__.  This will prevent the default pedantic warnings
	appearing during make check under compilation by GCC 4.3

--- libc/math/libm-test.inc	2007-10-27 20:14:25.000000000 -0500
+++ libc-patched/math/libm-test.inc	2008-02-19 09:52:24.000000000 -0600
@@ -2510,7 +2510,7 @@
   TEST_f_f (exp, 3, M_E3l);
   TEST_f_f (exp, 0.75L, 2.11700001661267466854536981983709561L);
   TEST_f_f (exp, 50.0L, 5184705528587072464087.45332293348538L);
-#ifdef TEST_LDOUBLE
+#if __LDBL_MAX_EXP__ > 1024 && defined (TEST_LDOUBLE)
   /* The result can only be represented in long double.  */
   TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L);
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]