Re: [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt

Keith Packard via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Joseph Myers <[email protected]> writes:

> However, it's probably nontrivial to get the tests running on other
> implementations, since they freely make use of glibc-specific
> features, and the particular glibc choices they test for regarding
> errno, exceptions and expected accuracy of results may not match the
> choices made by other libm implementations.

I agree -- I looked at getting the glibc tests running on newlib and
decided that it would be more effort that I could afford. For now, I've
got the original newlib test suite running after spending several months
fixing it.

In particular, for the math tests, I ran glibc against the test vectors
and replaced the expected results with those as the existing values had
become corrupted over the years (not just inaccurate, but wildly
wrong). Mismatches between newlib and glibc were investigated, and
patches to newlib have been integrated. No patches were needed for
glibc. Now newlib generates results that match glibc within reasonable
tolerance bounds. With the recent patches to fix up exceptions and errno
values, newlib and glibc match there as well. I guess this is kinda like
testing newlib against the glibc test suite at a distance -- glibc gets
tested, then we make sure newlib and glibc generate the same values for
a different set of tests...

I'd love to be able to spend time improving the accuracy of newlib code,
but just having code which constantly measures 'reasonably close' to
glibc is a huge improvement from my perspective.

-- 
-keith
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9WucUACgkQ2yIaaQAA
ABEoEw//VL6cY5LyiGtX7WlS252X4eQcAYt10DhaN5MHsRcIw/APWaoAccqvgIwq
xyQzIgdxpvJcDhWt7C9gVnmTm7CmUQrh7TdKlqUw1QeK+p84DmvgmA3DiNRgiR3p
69RO+5GE5aUF9w3Cex+1qMijWJ/Wi0zEVQBrxMOMi1XWjcrzc/XTHzXoBtDc0bzU
A9thyCa9+IMWdiGm7SgfnT1XqcdOMIID5CUxGtSaOMTNyzTkzMkw6V1NNTrJ2cEJ
kV1lIII05iU1y+2CAiAEr+5WfflDrRu9DJK8jiXEGvb1CqLlyE/3M1Tv2SmjjHmm
zx61PvWbi4fYEgMCy1SqG9+J8Av2xnMAQiaody7mKzAnF9nDjjid4aGNI8Gr5nFY
jJeX5fcL17rb+yGjl+0Hut34AtYqWqGwJ3juFHE9xehSG+IPtAQsZura3Gk98ade
wMULdt5s7DEwfuiv1dYTwIWGW6wwwIoz8EKTfLkrGrBXdYi/QnETyeFichc2annq
3djkZFSoy5/XAmQXoXORIZVweQIIzVpuO4J8vYdBJzRQ15rwXQR6zvEo6Mb/k0v8
eWIJaDsrAfKL//hBnSpHtxptfRUycSTfBk2mOayBeIdc01OUO3eEU1lal22sjsFa
WWrDhYWwJm+vfzMlOo5F70Us4Q8pJneGIrgXvFgN4hgNxTjtQA8=
=r404
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.