Details

[Home]

Issue of the Standard # S0620

Brief

Incorrect definition of the constant HUGE_VALL on ppc32, ppc64, s390, and s390x

Detailed Description

LSB 3.1 defines the constant HUGE_VALL in the section 13.7.3. math.h as follows:

#define HUGE_VALL 0x1.0p32767L

It is a correct value for x86, x86-64, and ia64, where LSB defines 'long double' as 128-bit(96-bit) extended double precision floating point type. At the same time 'long double' on ppc32, ppc64, s390, and s390x is defined in the LSB as 64-bit double precision floating point type.

Thus HUGE_VALL on these architectures have to be equal to 0x1.0p2047 just as HUGE_VAL.

Problem location(s) in the standard

Linux Standard Base Core Specification 3.1, Chapter 13. Base Libraries, 13.7. Data Definitions for libm, 13.7.3. math.h

Possible solutions

The HUGE_VALL definition should be architecture specific. On x86, x86-64, and ia64 it have to be defined with the current value:

#define HUGE_VALL 0x1.0p32767L

but on ppc32, ppc64, s390, and s390x it have to be defined with the new value:

#define HUGE_VALL 0x1.0p2047L

Accepted

LSB Bugzilla, 1760

Status

Fixed in LSB 3.2

[Home]