[PATCH 24/28] powerpc: hypot refactor and optimization
Gabriel F. T. Gomes
gabriel@inconstante.eti.br
Wed Jun 26 19:59:00 GMT 2019
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?
> * 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?
> - 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>
More information about the Libc-alpha
mailing list