public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Carlos O'Donell <carlos@redhat.com>,
	Matheus Castanho <msc@linux.ibm.com>,
	libc-alpha@sourceware.org
Cc: tuliom@linux.ibm.com
Subject: Re: [PATCH] Update powerpc libm-test-ulps
Date: Thu, 20 Aug 2020 15:56:36 -0300	[thread overview]
Message-ID: <1efa0451-3df4-73ee-93e3-934f6ff1a30d@linaro.org> (raw)
In-Reply-To: <076cd0b3-1988-144f-3c25-cc71a14218c2@redhat.com>



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;

And jN implementation also has low precision for some inputs.  With both constraints
I think 16ulps should be ok.

  reply	other threads:[~2020-08-20 18:56 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 [this message]
2020-08-20 19:44     ` Tulio Magno Quites Machado Filho
2020-08-20 21:25       ` Carlos O'Donell
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=1efa0451-3df4-73ee-93e3-934f6ff1a30d@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --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).