List Info

Thread: PowerPC libm-test.inc expl(1000.0L) result exceeds __LDBL_MAX__ for IBM Long Double 128.




PowerPC libm-test.inc expl(1000.0L) result exceeds __LDBL_MAX__ for IBM Long Double 128.
country flaguser name
United States
2008-02-20 14:18:26
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



  
PowerPC libm-test.inc expl(1000.0L) result exceeds __LDBL_MAX__ for IBM Long Double 1
user name
2008-05-22 10:26:45
On Wed, 2008-02-20 at 14:18 -0600, Ryan S. Arnold wrote:
> 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.

Ping.  This patch is rather trivial.

Please apply

Ryan S. Arnold

2008-02-20  Ryan S. Arnold  <rsaus.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



Re: PowerPC libm-test.inc expl(1000.0L) result exceeds __LDBL_MAX__ for IBM Long Doub
user name
2008-05-22 13:35:29
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ryan S. Arnold wrote:
> -#ifdef TEST_LDOUBLE
> +#if __LDBL_MAX_EXP__ > 1024 && defined
(TEST_LDOUBLE)

I don't understand this.  This exponent for the format is 15
bits in (14
bits but sign).  That's an exponent of 16384.  Where is the
problem?

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧
Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


iEYEARECAAYFAkg1vPEACgkQ2ijCOnn/RHTIIwCgvElGcNZmDozDn45+YLSr
T2cT
/uEAoI2lBuEg4sSM3pXZeWQY1c4XdkFC
=ZeT/
-----END PGP SIGNATURE-----

Re: PowerPC libm-test.inc expl(1000.0L) result exceeds __LDBL_MAX__ for IBM Long Doub
user name
2008-05-22 14:44:25
On Thu, 2008-05-22 at 11:35 -0700, Ulrich Drepper wrote:
> I don't understand this.  This exponent for the format
is 15 bits in (14
> bits but sign).  That's an exponent of 16384.  Where is
the problem?

Hi Ulrich,

PowerPC uses the IBM Long Double 128 format which is double
double, not
IEEE128.  So it has an 11-bit exponent and effective 106 bit
mantissa.

Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )