public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Keith Packard <keithp@keithp.com>
Cc: Kito Cheng <kito.cheng@gmail.com>, Newlib <newlib@sourceware.org>
Subject: Re: [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt
Date: Mon, 7 Sep 2020 17:41:00 +0000	[thread overview]
Message-ID: <alpine.DEB.2.21.2009071736590.18581@digraph.polyomino.org.uk> (raw)
In-Reply-To: <87blim87ps.fsf@keithp.com>

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

  reply	other threads:[~2020-09-07 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 20:54 Keith Packard
2020-09-03 20:54 ` [PATCH 1/2] libm/riscv: Fix machine-specific sqrt build process Keith Packard
2020-09-03 20:54 ` [PATCH 2/2] libm/riscv: Use common fma code when necessary Keith Packard
2020-09-04  3:07 ` [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt Kito Cheng
2020-09-04  4:51   ` Keith Packard
2020-09-07 17:41     ` Joseph Myers [this message]
2020-09-07 22:52       ` Keith Packard
2020-09-04 13:11 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2009071736590.18581@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=keithp@keithp.com \
    --cc=kito.cheng@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).