This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ppc] merge in powerpc version of slowpow.c

On Thu, Jan 03, 2013 at 11:07:33AM +0100, Andreas Jaeger wrote:
> >The powerpc version of slowpow.c adds an extra pass with the long
> >double functions, which reduces the number of values that fall back
> >into the slow mpa phase.  This should be useful for other
> Do you have some examples that still fall in the slow mpa phase?

I have one that I found[1] and checked with the same powtest program:

  time ./powtest 10000 1.0000000000000002 1.5000000000000050

This falls right to the bottom to the 768-bit phase.

> >+  static const long double ldeps = 0x4.0p-96;
> Is that constant correct for all the various long double formats we have?

Yes, both formats can hold the precision of this constant in long
double when adding it to 0x1.0p0, i.e. 0x1.0p0 + 0x4.0p-96 does not
get truncated to 0x1.0p0.

The value itself is the same as the one used in mpa below, which I
guess is also why it's written as 0x4.0p-96 and not 0x1.0p-92:

      static const mp_no eps = {-3,{1.0,4.0}};

> >+  /* Compute pow as long double, 106 bits */
> The comment 106 bits is not correct and needs updating,

Thanks, I missed that.  I'll update this to:

/* Compute pow as long double, which is 106 bits precision for IBM
   long double and 112 bits for IEE754 long double format.  */

I'll post an updated patch with this comment above if Steven or Ryan
think this needs any changes from the ppc perspective.  I assume it's
clear from your end for the general case with that changed comment?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]