From nobody Sun Aug 07 09:05:52 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M0tjD6ZwXz4YGx9; Sun, 7 Aug 2022 09:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M0tjD64Dlz44wv; Sun, 7 Aug 2022 09:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659863152; 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; bh=AOza8EUGVhfLqyhz2MvMqmEWn+TOlx0ofbeZBEj40uk=; b=K7aOTGfnFyp44w6tn6St13Sm2vch0jpbKK0cTNwYrn8VKvcnsQDKxKUTl8pb2Y4qCRRhL9 qJhTZwlyvOSrBELCgv749I/Rx6gHRGSQC2V/LcbND81dAq9bXsFLN4eGcxkpO6DlzcTaGU JjcXvw0oZUn8X5+za/hTrntNEGCwd4nps2yXtJKlZAmNc82J0KsWeDABK2Xm794W9wfGmi SOoJXaZ1PYiY6B2nEll7m9w/VQcDxU9BC6wbfmv70p1u9rXmmZkIANHsdcdwXschSgm28V GOSw6FZrSVfZmHRMwI6gJqZCX/vAwS1KmiaSvX48OLM8rQRBbh6zdyXp5wqe8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M0tjD57Blz168L; Sun, 7 Aug 2022 09:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27795q9v027107; Sun, 7 Aug 2022 09:05:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27795qd5027106; Sun, 7 Aug 2022 09:05:52 GMT (envelope-from git) Date: Sun, 7 Aug 2022 09:05:52 GMT Message-Id: <202208070905.27795qd5027106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 162bdeaa7324 - stable/12 - [libm] Correct comments in s_cbrt[l].c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 162bdeaa7324c4c75b015530eac4bcbd6c58d639 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659863152; 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; bh=AOza8EUGVhfLqyhz2MvMqmEWn+TOlx0ofbeZBEj40uk=; b=O82Y4JHU0V26jNwkXf1Mj571pGeDIIm+D8PzglClt6wC9fhCuknhK9x/pLTWAh5HbyQsrt Q9Rtb/IkXaBneLC+jg6H1HjE5ZvnFI5DndDK04dt5diKIzCZ1RYS09/5XwmoPDaWVVODmr 2TJksA4pk1mjrIn45BZtFAOpEDZqMIh+49oKKK8DQgUILOottPoy8OqDIfHL884Dc2sZ4s 7Wq5D3tM3AXBMKF33ssgMLN8Dfz2umZ3i6iJhzeLRiDCFO4nu55devGJ0XrsWxNQuKTFjR dUdGksy+PMLsnmHCYExz+XGTaCPbXi2BLhIfb/h8WaxkrLbuYfQAXCyNMCE82w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659863152; a=rsa-sha256; cv=none; b=ekR0TfuW+k50RfCRfP2K/YE9/ogtMRx1w7DNYOF/it65oKbdM0FYqs3wGDnsfNGFlEvvwe BAV4tRGF0qT/rkjKYTypNtyXbVjqxRP8OJAQ1Uq4uc+Td7LI03obGZGHZAZgFTdLKnBUJA W3Lcjz5AjsBswFwg/fNiNOGxDQOIWBwwPF627ADR23UL0W4eaDvd+L527/bFpUTqwYo0gd hb28hjeIqokZ2TrLkp+EL1zi0ekOu1SwUsCW5NFzX9MMepT3shzz7DxyII+8X41GlgfFqv xMNzJOIHvfc1EG+5LWDTye4+kgWuzhhs8IuOIMDxX+W4A2hSC+noUsJRVKT33g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=162bdeaa7324c4c75b015530eac4bcbd6c58d639 commit 162bdeaa7324c4c75b015530eac4bcbd6c58d639 Author: Steve Kargl AuthorDate: 2022-08-04 17:31:57 +0000 Commit: Dimitry Andric CommitDate: 2022-08-07 09:03:20 +0000 [libm] Correct comments in s_cbrt[l].c Damian McGuckin noted that the accuracy claims in the code for cbrt(3) and cbrtl(3) were incorrect. Fix the comments to more accurately describe the accuracies. PR: 265603 MFC after: 3 days (cherry picked from commit 369ea0520a3061c07400d7cd32172efb6af39815) --- lib/msun/src/s_cbrt.c | 2 +- lib/msun/src/s_cbrtl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/s_cbrt.c b/lib/msun/src/s_cbrt.c index 0e609e110d9a..4353d340a1ac 100644 --- a/lib/msun/src/s_cbrt.c +++ b/lib/msun/src/s_cbrt.c @@ -108,7 +108,7 @@ cbrt(double x) r=x/s; /* error <= 0.5 ulps; |r| < |t| */ w=t+t; /* t+t is exact */ r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */ - t=t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */ + t=t+t*r; /* error <= (0.5 + 0.5/3) * ulp */ return(t); } diff --git a/lib/msun/src/s_cbrtl.c b/lib/msun/src/s_cbrtl.c index 2236c0fa0348..b15c96ecde03 100644 --- a/lib/msun/src/s_cbrtl.c +++ b/lib/msun/src/s_cbrtl.c @@ -136,7 +136,7 @@ cbrtl(long double x) r=x/s; /* error <= 0.5 ulps; |r| < |t| */ w=t+t; /* t+t is exact */ r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */ - t=t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */ + t=t+t*r; /* error <= (0.5 + 0.5/3) * ulp */ t *= v.e; RETURNI(t);