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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D607B3858D20 for ; Wed, 13 Dec 2023 17:42:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D607B3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D607B3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702489338; cv=none; b=xgbmLSJZvkmUWJOw5XLDvxWYxzW2/TqlorxES48V4WXIwnk/Jkm5HpRjxlyjZj/A978ac8tLqMUP7m62uVl1vmVwYGHQ1PgsPstH3GvsxPF5j21C4CAyAS/Ffvyc9rQrqqabKBaP0ZGGyp5mvRaH3NxclnMmizZljggEkVPZePA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702489338; c=relaxed/simple; bh=nurHd5XDU6s5cYcIYdZIZyM6eqFIE5gs2qKItxCj5aE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=lvbzuyVKqENChzt63meQo85Lka14sKQUspELzspLR1UBb3HlTRcX5mLKR4mlkALGNxiZ0/gRDstwFiGVDCm7cPqupAgCHDsauaHUKoBS/S+TOqeV0uMRZWfzu20rtQOgU1n5K1rt6kck2XQ7MhFH2fP2ReVeL1SktJXAeRHX1bk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702489336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DjLSM5KcYo4sDTfMshD75WLct6I1XTJTCe5iKu4e06M=; b=hzbSnxDG3KeSgW+W//mCfEW8tjvQvegh9ymRAaL4v67WsaJZ/fJzPM8EQf3w1w9XVuW5// 7YtJicHwCykt7jkI/Ynh9UxJq10xg2/xgeFQuhUM7mZBk6PeRvnjwrB6Hk67eYx+RG6v/Y c7jiJ1SAPP6QN91VAU64CztOT3OUxL8= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-139-aAMMETBmN8SbTfznYopZUg-1; Wed, 13 Dec 2023 12:42:14 -0500 X-MC-Unique: aAMMETBmN8SbTfznYopZUg-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-67f02c94f13so5281146d6.1 for ; Wed, 13 Dec 2023 09:42:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702489334; x=1703094134; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DjLSM5KcYo4sDTfMshD75WLct6I1XTJTCe5iKu4e06M=; b=d1YKy8sYb9hW+DxqjBgxStcv44BojlLsw7KUHRPpTa9aRx257Kza8NqdNzwpxEBIA8 8vowFmTlVTiGIq6+RPr0sCbF0O5hh3SIbfjf/HS8JSblCeePsS7B/VH0SECuTpr7yJkE q/8Kpircn+kIbUc2RjnRTgLdBTj3pGJ06N0spE2bkZvDHf8RC14aEkeJ7yZTwSI1Cbx6 VkpPSDPbZIS1W6HWIHanszGbF4jMVEXlsz/fMpFa4m/1iwxx8TlOB9BG2ZWwxV/6L3Gp H6SyX++rmRGQ12V7RuzRofoh+07GVxD+oW2+6y5gr73kMt/zA8LLP6o3HdoG+VXYaQkX +/aQ== X-Gm-Message-State: AOJu0Ywjd+T6p4wCUzz0tsMhCqc7T94v9G4poU7wgCAzaIUpg/XRJZG8 xOacRQsEvA+lG4wcXVAI7GMt5LBJ6VIRoTRK3HIdesk0JJ2ZgOcEDLAe9Q0NGmmYlzRpS+Qugqk cDv9vqPZqi2SESY1Ki9ptMo1N7G+j X-Received: by 2002:a05:6214:1bcd:b0:67a:a03a:5e97 with SMTP id m13-20020a0562141bcd00b0067aa03a5e97mr14465163qvc.15.1702489333854; Wed, 13 Dec 2023 09:42:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhqaSHOPrtCGPJfk9KvMyqlcZ3ERcxacm6i346ZMvkcsjGdRP9R1wadWaiaKeA3uHMLSTlsQ== X-Received: by 2002:a05:6214:1bcd:b0:67a:a03a:5e97 with SMTP id m13-20020a0562141bcd00b0067aa03a5e97mr14465151qvc.15.1702489333588; Wed, 13 Dec 2023 09:42:13 -0800 (PST) Received: from [192.168.0.241] ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id a16-20020a0ccdd0000000b0067abf74283esm5123163qvn.63.2023.12.13.09.42.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Dec 2023 09:42:12 -0800 (PST) Message-ID: <783d18da-a3bf-179d-9961-70aed5f368e5@redhat.com> Date: Wed, 13 Dec 2023 12:42:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: largest known errors To: Paul Zimmermann , libc-alpha@sourceware.org, Joseph Myers References: From: Carlos O'Donell Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/13/23 03:49, Paul Zimmermann wrote: > Hi, > > on https://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html it is written: > > "The table lists the maximum error for each function which is exposed by one of the existing tests in the test suite." [*] > > Function i686 ix86 x86_64 > j0f 9 9 9 > j0 5 5 3 > > As a consequence, people conclude that the maximum error is 9 ulps for all > GNU libc functions, see https://dl.acm.org/doi/pdf/10.1145/3624062.3624166 > end of page 893, right column. In general they would be correct to assume that given the manual information. > But we know the largest error for j0 on x86_64 is at least 4.51e14 ulps [1]. > See also https://sourceware.org/bugzilla/show_bug.cgi?id=27670. > Moreover the test suite contains many "xfail" entries, for example: > > j0 0x1.31ec02p+1 xfail:binary64 > > If one adds j0 0x1.33d152e971b4p+1 in auto-libm-test-in and reruns make > regen-ulps, one gets as output: > > Failure: Test: j0 (0x2.67a2a5d2e368p+0) > Result: > is: -5.7480381767140581e-17 -0x1.0914db68ef3e2p-54 > should be: -6.1087652597367303e-17 -0x1.19b7921f03c8ep-54 > difference: 3.6072708302267220e-18 0x1.0a2b6b6148ac0p-58 > ulp : 292656578119852.0000 > max.ulp : 3.0000 > > but the final result says: > > Test suite completed: > 0 test cases plus 0 tests for exception flags and > 0 tests for errno executed. > All tests passed successfully. > > I believe we should amend the sentence [*], and/or replace the bounds that we > know are wrong by some special value, say U for Unbounded. There are two issues here and the nuances around them matter to me. (a) There are known defects where ULPs may reach values that are not useful for talking about the library in general. (b) There is value in being clear about the worst case known ULPs for an implementation of a given algorithm. If a test is marked as XFAIL then it is clearly (a) and listing that worst case ULPs in the manual may not be useful. If the test is not marked as XFAIL then it is clearly in (b) and we should list it in the manual as the worst case known ULPS because that is what the currently implemented algorithm does. Lastly, all XFAIL entries should reference bugs in our bug tracker, and if they don't then we should create them to track and resolve the bug. In closing... How might we amend the sentence to better explain (a) and (b)? > Paul > > [1] https://members.loria.fr/PZimmermann/papers/accuracy.pdf > -- Cheers, Carlos.