From: Joseph Myers <joseph@codesourcery.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Fix the inaccuracy of j0f (BZ 14469) and y0f (BZ 14471) [v2]
Date: Fri, 22 Jan 2021 15:06:02 +0000 [thread overview]
Message-ID: <alpine.DEB.2.22.394.2101221457550.98734@digraph.polyomino.org.uk> (raw)
In-Reply-To: <f8944d2d-f0c5-c6d1-85c1-397ea9599426@linaro.org>
On Fri, 22 Jan 2021, Adhemerval Zanella wrote:
> On 22/01/2021 11:23, Paul Zimmermann wrote:
> > Dear Adhemerval,
> >
> >> Paul, besides mixed indentation and other style issues (which should
> >> be easier to fix, I can help you out with this), I am seeing these failures
> >> on a x86_64 with 9.2.1: [...]
> >
> > these failures are due to the inputs that now give the largest error in
> > binary32, rounding to nearest, because I've added those inputs to
> > math/auto-libm-test-in.
> >
> > For math/test-float-j0 and math/test-float-y0, it appears those inputs
> > give an error larger than 9 ulps for some directed rounding modes.
> >
> > For other failures, it appears those inputs, when converted to other
> > formats, also give errors larger than 9 ulps.
> >
> > Should I remove those inputs from auto-libm-test-in?
>
> So if I understand correctly, you patch increase the ulps for non-default
> rounding for this specific inputs? If it were the case, could be fix it
> as well?
The 9ulp limit applies to all rounding modes; implementations that don't
go over that limit in any rounding mode are certainly best. (In some
cases SET_RESTORE_ROUNDF (FE_TONEAREST) (for float; different macro names
for different types) can be used as a cheap way to reduce errors in other
rounding modes, but then in general you need to take care about
recomputing some overflowing / underflowing results in the original
rounding mode.)
It's a good idea to test any patch adding inputs to auto-libm-test-in for
all floating-point formats supported by glibc, to make sure large errors
aren't introduced for other formats. That means testing on at least two
architectures (because ldbl-128ibm is only supported on powerpc, and
ldbl-96 is only supported on x86_64/i386/ia64). In all cases, the patch
as submitted needs to be tested on at least one architecture to make sure
it does not introduce any test failures there (and in particular, that
there are no too-large ulps on that architecture after the patch for any
non-XFAILed input in auto-libm-test-in).
If you don't want to fix all implementations at once for a given input in
auto-libm-test-in, you can use xfail:<format> or xfail-rounding:<format>,
e.g. xfail:binary128. Such an XFAIL, for cases where errors are too large
for some formats, should have a comment referencing an open bug for that
issue of large errors (for Bessel functions, such bugs are already open in
Bugzilla, since we can consider the open bugs to cover all affected
formats).
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2021-01-22 15:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 10:43 [PATCH] Fix the inaccuracy of j0f (BZ 14469) and y0f (BZ 14471) [v2] Paul Zimmermann
2021-01-22 13:04 ` Adhemerval Zanella via Libc-alpha
2021-01-22 14:23 ` Paul Zimmermann
2021-01-22 14:37 ` Adhemerval Zanella via Libc-alpha
2021-01-22 15:06 ` Joseph Myers [this message]
2021-01-25 9:59 ` Paul Zimmermann
2021-01-25 13:01 ` Adhemerval Zanella via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2101221457550.98734@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@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).