Re: [Boost-bugs] [Boost C++ Libraries] #9717: Boost math library on PPC64 has thousands of errors

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9717: Boost math library on PPC64 has thousands of errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-26 17:10:59


#9717: Boost math library on PPC64 has thousands of errors
--------------------------------------+-------------------------
  Reporter: Tony Reix <tony.reix@…> | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: math
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------

Comment (by Tony Reix <tony.reix@…>):

 The issue may be due to the value of __LDBL_EPSILON__ on Linux on PPC64.


 Lets use: gcc -E -dM file.cpp which prints the constants.
 Then:
       gcc -E -dM file.cpp | grep DBL_EPSILON__
 gives the value of constants ending like this.

 AMD64:
 #define __LDBL_EPSILON__ 1.08420217248550443401e-19L
 #define __DBL_EPSILON__ double(2.22044604925031308085e-16L)

 AIX 61S PPC64:
 #define __LDBL_EPSILON__ 2.2204460492503131e-16L
 #define __DBL_EPSILON__ double(2.2204460492503131e-16L)

 Ubuntu/PPC64-LE:
 #define __LDBL_EPSILON__ 4.94065645841246544176568792868221e-324L
 #define __DBL_EPSILON__ double(2.22044604925031308084726333618164e-16L)

 Fedora/PPC64-BE:
 #define __LDBL_EPSILON__ 4.94065645841246544176568792868221e-324L
 #define __DBL_EPSILON__ double(2.22044604925031308084726333618164e-16L)


 IBM said:
 LDBL_EPSILON is the smallest nonnegative number such that 1 + LDBL_EPSILON
 is representable. Given that PowerPC (on Linux) uses the "double +
 double"
 representation, where the value of the long double is determined as the
 sum
 of two doubles, LDBL_EPSILON ends up very small, namely the smallest
 representable "double". (Because you can then represent 1 + LDBL_EPSILON
 by setting the first double of the pair to 1, and the second to
 LDBL_EPSILON.)

 The unusually small epsilon is just one aspect of the fact that the
 PowerPC
 long double format simply is not IEEE compliant. (It may well be that the
 fact that long double is not IEEE compliant gives trouble to Boost ...
 Maybe there is a way to tell Boost to avoid using long double?)

 On Intel, long double is 80-bit IEEE, which reflects the epsilon value you
 see there. On AIX, they're apparently using "long double" == "double".


 I think that something must be changed in Boost. However, I'm unable to
 find what and where.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9717#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC