[PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt
Joseph Myers
joseph@codesourcery.com
Mon Sep 7 17:41:00 GMT 2020
On Thu, 3 Sep 2020, Keith Packard via Newlib wrote:
> I've got a bunch of errno/exception tests that I've written for picolibc
> that catch missing errno values, which is what the sqrt difference would
> have caused. As for fma, you'd have to construct a test that checked for
> the difference between a true fma and (a*b)+c that the general code in
> newlib currently uses.
glibc has a great many tests of expected libm function return values,
errno and exceptions, both manually maintained (libm-test-*.inc) and with
expected results generated by MPFR (auto-libm-test-in generating
auto-libm-test-out-* via gen-auto-libm-tests.c). It would be interesting
to see what those tests show up as bugs when run on different libm
implementations (and vice versa, of course, running other libm
implementations' tests on glibc). 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.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Newlib
mailing list