[PATCH 13/23] math: Fix the expected atan2f (inf) results
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Dec 4 16:10:05 GMT 2024
On 03/12/24 16:03, Adhemerval Zanella Netto wrote:
>
>
> On 29/11/24 13:40, Joseph Myers wrote:
>> On Fri, 29 Nov 2024, Adhemerval Zanella wrote:
>>
>>> The pi defined constants are not the expected value for atan2
>>> on non-default rounding modes. Instead use the autogenerated value.
>>
>> The same principle presumably also applies to (the imaginary part of) clog
>> and clog10. (And indeed expected errors for the imaginary part of clogf
>> could also be removed from libm-test-ulps files if clog is changed to
>> defer to atan2 for the imaginary part when called on a zero argument.)
>>
>
> I will check clog10, and I think we can apply it to carg as well.
It turns out that although the new atan2f does improve clog10 imaginary
precision on some archs (on x86_64 max ulps now show 2 instead of 4 for
the tested inputs); it is still not correctly rounded (I guess because it
does not calculate in the expected range, since it requires a
M_LOG10E multiplication after the atan2 call).
It does make the imaginary part of clog and the carg result correctly
rounded. I will update the patch.
More information about the Libc-alpha
mailing list