Elementary Function Work
Joseph Myers
joseph@codesourcery.com
Tue Dec 8 15:39:44 GMT 2020
On Tue, 8 Dec 2020, N.G. Timmons wrote:
> I would be interested in setting up a test suite to provide ULP error
> information, error distribution information and number of known incorrectly
> rounded results that could be run to generate a documentation page or
> automatically update the function comment with the information for easy
> accessibility.
I suggest working with Paul Zimmermann since he's been working in that
area, and it's naturally something separate from any particular libm
implementation. (Though different libm implementations may make different
choices regarding the bounds on acceptable errors, requirements for
correctness of floating-point exceptions raised, etc.)
https://homepages.loria.fr/PZimmermann/papers/#accuracy
There are obvious areas for extending his work, such as covering the
ldbl-96 and ldbl-128ibm formats and <complex.h> functions and different
rounding modes.
When function errors are found that are beyond the limits of those
accepted for glibc, it's appropriate to file bug reports when such bug
reports aren't already open for the functions in question (see his recent
bug reports for lgamma and tgamma). When function errors are found that
are within the bounds of those accepted for glibc, but larger than those
appearing in libm-test-ulps, it's appropriate to add the test inputs in
question to auto-libm-test-in and regenerate the corresponding
auto-libm-test-out-* file, so that the libm-test-ulps files (and thus the
tables in the glibc manual generated from those files) more accurately
reflect the largest known errors.
If a function gets reimplemented so as to reduce the largest errors (for
most functions with errors larger than 1 or 2 ulps, I expect that could be
done without making performance any worse), it then makes sense to remove
entries for that function in libm-test-ulps files so they can be
regenerated from scratch.
When large errors are found in other libm implementations, reporting bugs
against those implementations is a good idea as well (depending on each
implementation's policy on what errors count as bugs).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list