[PATCH] math: Refactor how to use libm-test-ulps

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Jan 28 13:32:21 GMT 2025



On 28/01/25 10:27, Paul Zimmermann wrote:
>        Dear Adhemerval,
> 
>> The constant libm-test-ulps shows little value, where it is usually a
>> mechanical change done by the maintainer, for past releases it isi
> 
> it isi -> it is

Ack.

> 
>> The manual error table is also removed, Paul Zimmermann has bee
> 
> has bee -> has been

Ack.

> 
>> tracking libm precision with a more comprehensive analysis for some
>> releases; so link to his work instead.
>> +A more comprehensive analysis of @theglibc math function precision could
>> +be found in 'Accuracy of Mathematical Functions in Single, Double, Double
>> +Extended, and Quadruple Precision'; Brian Gladman, Vincenzo Innocente,
>> +John Mather, and Paul Zimmermann at
>> +@url{https://members.loria.fr/PZimmermann/papers/accuracy.pdf}
> 
> as Joseph pointed out, this analysis is only for x86_64, and for rounding to
> nearest.
> 
> For complex functions, you might point to this (again for x86_64 and RNDN):
> 
> https://inria.hal.science/hal-04714173https://inria.hal.science/hal-04714173

Thanks, but I am getting a non existent size for this link.

> 
>> +A "libm-test-ulps" is required only to test for extra contraints in
>> +the math tests.  The file contains lines for maximal errors of single
>> +functions, like:
>> +
>> +Function "yn":
>> +float: 2
>> +double: 6
>> +
>> +It means that if the "yn" shows error larger than 2 ULP for float
>> +or 3 ULP for double, the related test for "symbol" will fail.  It can
> 
> 3 ULP -> 6 ULP

Ack.

> 
> it might be useful to give an example with yn_upward (if supported)

Right, I will extend the descriptor with the supported rounding modes.

> 
> Paul

I have fixed them locally, since I just sent a v2 with Joseph remarks.


More information about the Libc-alpha mailing list