bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-float fails on ppc64 because DBL_MIN_EXP < LDBL_MIN_EXP


From: Paolo Bonzini
Subject: Re: test-float fails on ppc64 because DBL_MIN_EXP < LDBL_MIN_EXP
Date: Tue, 29 Nov 2011 10:52:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 08/31/2011 05:48 PM, Jim Meyering wrote:
The test-float test is failing on ppc64 with:

     gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)
     (albeit an aging Fedora 12 system)

due to the failure of this assertion:

     ASSERT (LDBL_MIN_EXP<= DBL_MIN_EXP);

It fails because of these numbers:

     $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP'
     #define __DBL_MIN_EXP__ (-1021)
     #define __LDBL_MIN_EXP__ (-968)

It looks like the right test would be

ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG);

This would be enough to assert that a double can be assigned to a long double.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]