From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 145893857C5E for ; Thu, 20 Aug 2020 19:44:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 145893857C5E Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07KJVob5096398; Thu, 20 Aug 2020 15:44:19 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 330ucpm6rv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Aug 2020 15:44:19 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 07KJVsaC096643; Thu, 20 Aug 2020 15:44:18 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 330ucpm6rk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Aug 2020 15:44:18 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07KJefeY001522; Thu, 20 Aug 2020 19:44:18 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04wdc.us.ibm.com with ESMTP id 3304uexn93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Aug 2020 19:44:18 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07KJiHg963570232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Aug 2020 19:44:17 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39727BE053; Thu, 20 Aug 2020 19:44:17 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF5E4BE04F; Thu, 20 Aug 2020 19:44:16 +0000 (GMT) Received: from linux.ibm.com (unknown [9.65.195.158]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 20 Aug 2020 19:44:16 +0000 (GMT) From: Tulio Magno Quites Machado Filho To: Adhemerval Zanella , "Carlos O'Donell" , Matheus Castanho , libc-alpha@sourceware.org Subject: Re: [PATCH] Update powerpc libm-test-ulps In-Reply-To: <1efa0451-3df4-73ee-93e3-934f6ff1a30d@linaro.org> References: <20200820183700.115087-1-msc@linux.ibm.com> <076cd0b3-1988-144f-3c25-cc71a14218c2@redhat.com> <1efa0451-3df4-73ee-93e3-934f6ff1a30d@linaro.org> User-Agent: Notmuch/0.29.1 (http://notmuchmail.org) Emacs/26.3 (x86_64-redhat-linux-gnu) Date: Thu, 20 Aug 2020 16:44:15 -0300 Message-ID: <875z9dgl0w.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-20_03:2020-08-19, 2020-08-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 adultscore=0 malwarescore=0 impostorscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008200151 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 19:44:21 -0000 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; > > 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. 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 -- Tulio Magno