This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix IBM long double division inaccuracy (glibc bug 15396)
- From: Alan Modra <amodra at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com, Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Date: Sat, 4 Jan 2014 15:23:58 +1030
- Subject: Re: Fix IBM long double division inaccuracy (glibc bug 15396)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1401022142320 dot 28168 at digraph dot polyomino dot org dot uk>
On Thu, Jan 02, 2014 at 09:46:56PM +0000, Joseph S. Myers wrote:
> (Note that there remain other bugs in the IBM long double code, some
> causing glibc test failures, at least (a) invalid results in rounding
> modes other than FE_TONEAREST, (b) spurious overflow and underflow
> exceptions, mainly but not entirely where discontiguous mantissa bits
> are involved.)
Thing is, the algorithms in rs6000/ibm-ldouble.c require round to
nearest to generate correct results. Quoting from the PowerPC64 ABI:
This "Extended precision" differs from the IEEE 754 Standard in the
following ways:
* The software support is restricted to round-to-nearest mode.
Programs that use extended precision must ensure that this rounding
mode is in effect when extended-precision calculations are performed.
* Does not fully support the IEEE special numbers NaN and INF. These
values are encoded in the high-order double value only. The
low-order value is not significant.
* Does not support the IEEE status flags for overflow, underflow, and
other conditions. These flag have no meaning in this format.
--
Alan Modra
Australia Development Lab, IBM