[PATCH v4 05/12] math: Use an improved algorithm for hypotl (ldbl-128)
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Dec 6 11:58:19 GMT 2021
Hi Adhemerval,
+ /* If ay is tiny, scale both inputs up. */
+ if (__glibc_unlikely (ay < TINY_VAL))
+ {
+ if (__glibc_unlikely (ax >= ay / EPS))
+ return ax;
Why not return ax + ay like in the other special cases? It's more accurate for rounding
upwards, and it's best to keep the code as similar as possible as the double version.
Cheers,
Wilco
More information about the Libc-alpha
mailing list