From: Carlos O'Donell <carlos@redhat.com>
To: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>,
Matheus Castanho <msc@linux.ibm.com>,
libc-alpha@sourceware.org
Subject: Re: [PATCH] Update powerpc libm-test-ulps
Date: Thu, 20 Aug 2020 17:25:40 -0400 [thread overview]
Message-ID: <8da995b5-db39-b306-56e7-693c864a824e@redhat.com> (raw)
In-Reply-To: <875z9dgl0w.fsf@linux.ibm.com>
On 8/20/20 3:44 PM, Tulio Magno Quites Machado Filho wrote:
> Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> writes:
>
>> On 20/08/2020 15:39, Carlos O'Donell wrote:
>>> On 8/20/20 2:37 PM, Matheus Castanho via Libc-alpha wrote:
>>>> Before this patch, the following tests were failing:
>>>>
>>>> ppc and ppc64:
>>>> FAIL: math/test-ldouble-j0
>>>>
>>>> ppc64le:
>>>> FAIL: math/test-ibm128-j0
>>>> ---
>>>> sysdeps/powerpc/fpu/libm-test-ulps | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
>>>> index cd2a5fed45..0b82c3f107 100644
>>>> --- a/sysdeps/powerpc/fpu/libm-test-ulps
>>>> +++ b/sysdeps/powerpc/fpu/libm-test-ulps
>>>> @@ -1317,13 +1317,13 @@ Function: "j0_downward":
>>>> double: 2
>>>> float: 4
>>>> float128: 4
>>>> -ldouble: 11
>>>> +ldouble: 12
>>>>
>>>> Function: "j0_towardzero":
>>>> double: 5
>>>> float: 6
>>>> float128: 2
>>>> -ldouble: 8
>>>> +ldouble: 16
>>>
>>> We should not have ULPs higher than 9.
>>>
>>> I see Adhemerval added some 11 ULPs here for cexp.
>>>
>>> We should be able to achieve <= 9 ULPs on these algorithms, otherwise there are
>>> compiler problems that need fixing?
>>
>> We are more forgiving for IBM long double due its inherent precision issues:
>>
>> math/libm-test-support.c
>>
>> 228 if (testing_ibm128)
>> 229 /* The documented accuracy of IBM long double division is 3ulp
>> 230 (see libgcc/config/rs6000/ibm-ldouble-format), so do not
>> 231 require better accuracy for libm functions that are exactly
>> 232 defined for other formats. */
>> 233 max_valid_error = exact ? 3 : 16;
>> 234 else
>> 235 max_valid_error = exact ? 0 : 9;
Thanks. I didn't know that.
>>
>> And jN implementation also has low precision for some inputs. With both constraints
>> I think 16ulps should be ok.
>
> There is also a loss of precision with different rounding modes in libgcc.
>
> There are currently 30 entries for ibm128 with ULP between 10 and 16 (without
> counting this patch). Maybe some of these should actually be marked as
> xfail-rounding:ibm128-libgcc instead.
If the loss of precision is due to the implementation then it seems like using
an XFAIL is not an accurate representation of the state.
> The only way to validate this is by compiling glibc with a libgcc that has a
> patch from Joseph. I have an up-to-date version of that patch in
> https://github.com/tuliom/gcc/commit/ca42479cae3c2b56651c3e97bb5eeaf24ca4bb61
Interesting patch, it looks similar to what we do in glibc for some of the
libm functions.
--
Cheers,
Carlos.
next prev parent reply other threads:[~2020-08-20 21:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 18:37 Matheus Castanho
2020-08-20 18:39 ` Carlos O'Donell
2020-08-20 18:56 ` Adhemerval Zanella
2020-08-20 19:44 ` Tulio Magno Quites Machado Filho
2020-08-20 21:25 ` Carlos O'Donell [this message]
2020-08-31 12:46 ` Matheus Castanho
2020-08-31 17:43 ` Tulio Magno Quites Machado Filho
2020-09-01 17:31 ` Joseph Myers
2020-09-02 14:52 ` Patsy Griffin
2020-08-20 19:00 ` Paul Zimmermann
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=8da995b5-db39-b306-56e7-693c864a824e@redhat.com \
--to=carlos@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=msc@linux.ibm.com \
--cc=tuliom@linux.ibm.com \
/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).