[PATCH 11/23] math: Add inf support on gen-auto-libm-tests.c
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue Dec 3 18:51:41 GMT 2024
On 29/11/24 13:35, Joseph Myers wrote:
> On Fri, 29 Nov 2024, Adhemerval Zanella wrote:
>
>> For some correctly rounded inputs where infinity might generate
>> a number (like atanf), comparing to a pre-defined constant does not
>> yield the expected result in all roundind modes.
>>
>> The most straightforward way to handle it would be to get the expected
>> result from mpfr, where it handles all the rounding mode.
>
> This is missing updates to the comment at the top of gen-auto-libm-tests.c
> ("Inputs are either finite real numbers or ...") to explain the handling
> of infinities.
>
Right, I changed to:
Other lines are test lines, of the form "function input1 input2
... [flag1 flag2 ...]". Inputs are either finite real numbers,
positive or negative infinite (in the form of "inf" or "-inf"), or
integers, depending on the function under test. Real numbers may be
in any form acceptable to mpfr_strtofr (base 0), infinite may in any
form acceptable to mpfr_set_inf, and integers in any form acceptable
to mpz_set_str (base 0). In addition, real numbers may be certain
special strings such as "pi", as listed in the special_real_inputs
array.
More information about the Libc-alpha
mailing list