This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Optimized version of powf()
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Paul Clarke <pc at us dot ibm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 9 Jun 2017 01:00:56 +0000
- Subject: Re: [PATCH] powerpc: Optimized version of powf()
- Authentication-results: sourceware.org; auth=none
- References: <12ffe69c-1416-b216-7883-7e69b6ce1e89@us.ibm.com>
On Thu, 8 Jun 2017, Paul Clarke wrote:
> + d2 = d2 * (ivln2_l + (double)ivln2_h) -
> + d2 = d1*d2*((double)cp_h + cp_l);
> + d2 = d2+((double)dp_h[k]+dp_l[k])+(double)n;
> + d1 = d1 * ((double)lg2_h + lg2_l);
These expressions all seem like unidiomatic conversions to direct use of
double. I'd expect all of ivln2, cp, dp, lg2 to become double constants,
with rounded-to-nearest double values expressed as hex floats, instead of
adding high and low parts as float, unless there is some reason that
wouldn't work. (dp_h[1] + dp_l[1] doesn't have a comment saying what
logical value it's meant to be, but it looks like log2(1.5).)
--
Joseph S. Myers
joseph@codesourcery.com