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 24/28] powerpc: hypot refactor and optimization



On 26/06/2019 16:59, Gabriel F. T. Gomes wrote:
> On Fri, Mar 29 2019, Adhemerval Zanella wrote:
>>
>>   - Two reduntant checks (for y == 0 and y > two60factor && (x / y) > two60)
>                                 ~~~~~~
> I don't understand why y == 0 is redundant.  It looks like an optimization
> as much as the check for x > y * 0x1p+60.  Should we actually remove the
> check for y == 0?

Indeed redundant is not the correct word, it is an optimization. I have
reinstate it.

> 
>> 	* sysdeps/powerpc/fpu/e_hypot.c (two60, two500, two600, two1022,
>> 	twoM500, twoM600, two60factor, pdnum): Remove.
>> 	(TEST_INFO_NAN): Remove macro.
> 
> Missing mention to the removal of GET_TW0_HIGH_WORD?

Ack.

> 
>> -  if (y == 0.0)
>> -    return x;
> 
> As mentioned above, is it actually redundant?
> 
>> +  if (y <= 0x1.fffffffffffffp+963 && x > (y * 0x1p+60))
>> +    return x + y;
> 
> OK.  Will not overflow.
> 
> Other than that the patch looks good to me.
> 
> Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
> 


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