[PATCH v5 4/7] math: Remove the SVID error handling from atan2f
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Fri Oct 31 18:42:26 GMT 2025
Hi Adhemerval,
- return asdouble (t);
+ double r = asdouble (t);
+ float rf = r;
+ if (__glibc_unlikely (fabsf (rf) < 0x1p-126f))
+ __set_errno (ERANGE);
+ return rf;
Should be:
if (__glibc_unlikely (rf == 0.0)) return __math_uflowf (t >> 63);
+ float rf = r;
+ if (__glibc_unlikely (fabsf (rf) == 0.0f))
+ return __math_uflowf (asuint (rf) >> 1);
+ return rf;
The fabsf is redundant.
Cheers,
Wilco
More information about the Libc-alpha
mailing list