From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 6CAD93857C4D for ; Thu, 20 Aug 2020 21:25:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6CAD93857C4D Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-414-Z5OWRBrzN9-dMvMZ7jfBgA-1; Thu, 20 Aug 2020 17:25:43 -0400 X-MC-Unique: Z5OWRBrzN9-dMvMZ7jfBgA-1 Received: by mail-qk1-f197.google.com with SMTP id 1so2063409qki.22 for ; Thu, 20 Aug 2020 14:25:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=8aTr0/GgqJ1737qQePzp8GD9/QJtut2do5gkzAamj9Y=; b=fX8RijnG/Xjwc8gSpazwyUtCBaR6hU026JO4urZdnR0oExJoakP1vg9zpTF6w57Y6m MocpOgPMypS40usVoEyirvkWgluRZNO6gp2D+Nz7uv81s6MJY2+4ZtZrmMgdFO7ru7z/ kSbqNsu4ykx5EMW1F6X6NhTVK8G9T4LrCnLq57tsP7beH3UsIpUtgPFgV6QIXim1BB6Q zrNXP6+LlTJcChWMJHeEQOhxpPm477UYHSSiXye6o/QSArcFq1EUMpWvJtAZdhtYnt9O +vI08GQWw2Harz5c6cHf+Wd1N93lU8VCkKFqTZokuD7JvzXZIeEGhQDIwWCHu5lSWK6w ucJA== X-Gm-Message-State: AOAM531SupVR9pjlwxssJCb+ME5UtAsAjuKYD9RJFREdG+tX/M459oMu PLAGPB88Uo2oCPrOaag/BTXeZZtHwOU3oimZ65HQepmPGFFbrV10WZ1w+77vy35Te/DHG4fBeql KgQNYlVl5KLPrB4EsBRwH X-Received: by 2002:a37:9d53:: with SMTP id g80mr384878qke.17.1597958742861; Thu, 20 Aug 2020 14:25:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTM42AUv9T2d6JLPTnLFnGUkWNwiG3n5rgCowPsV9vZLwneOyLBp4sEJQpvE/c5NrS4sdJ6w== X-Received: by 2002:a37:9d53:: with SMTP id g80mr384860qke.17.1597958742617; Thu, 20 Aug 2020 14:25:42 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id x28sm3351686qki.55.2020.08.20.14.25.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2020 14:25:42 -0700 (PDT) Subject: Re: [PATCH] Update powerpc libm-test-ulps To: Tulio Magno Quites Machado Filho , Adhemerval Zanella , Matheus Castanho , libc-alpha@sourceware.org References: <20200820183700.115087-1-msc@linux.ibm.com> <076cd0b3-1988-144f-3c25-cc71a14218c2@redhat.com> <1efa0451-3df4-73ee-93e3-934f6ff1a30d@linaro.org> <875z9dgl0w.fsf@linux.ibm.com> From: Carlos O'Donell Organization: Red Hat Message-ID: <8da995b5-db39-b306-56e7-693c864a824e@redhat.com> Date: Thu, 20 Aug 2020 17:25:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <875z9dgl0w.fsf@linux.ibm.com> Content-Language: en-US X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2020 21:26:02 -0000 On 8/20/20 3:44 PM, Tulio Magno Quites Machado Filho wrote: > Adhemerval Zanella via Libc-alpha 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.