[PATCH][ppc] merge in powerpc version of slowpow.c
Andreas Jaeger
aj@suse.com
Thu Jan 3 11:14:00 GMT 2013
On 01/03/2013 11:35 AM, Siddhesh Poyarekar wrote:
> 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. */
x86-64 uses the code as well and has 80-bit precision.
> 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?
Yes, this is ok for me,
Andreas
>
> Siddhesh
>
> [1] http://readlist.com/lists/gcc.gnu.org/gcc-help/0/716.html
>
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libc-alpha
mailing list