This is the mail archive of the libc-alpha@sourceware.org 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] powerpc: Optimized version of powf()


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


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