On Wed, Jul 31, 2019 at 08:43:50PM +0200, Marc Glisse wrote: > On Wed, 31 Jul 2019, Jonathan Wakely wrote: > > >So something like the attached patch. The glibc <math.h> says the > >values I used have enough digits for IEEE quad-precision: > > > >/* The above constants are not adequate for computation using `long > >double's. > > Therefore we provide as an extension constants with similar names as a > > GNU extension. Provide enough digits for the 128-bit IEEE quad. */ > > > >I don't know if we need more accuracy for IBM double double. > > double double has less precision than quad so it should be fine.
The *precision* (as defined in IEEE 754) of double double is much higher than that of IEEE quad precision float: "the maximum number of significant digits that can be represented in a format" -- it's just that most of those bits have to be zero! Neither double-double is a subset of QP, nor the other way around. This is *the* problem we have in rs6000 with these two float formats: GCC cannot handle if two FP formats are like that. (The math constants here are fine for double double, of course). Segher