From nobody Tue Oct 01 01:18:55 2024 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 4XHg7g6JgVz5XxpH; Tue, 01 Oct 2024 01:18:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XHg7g4wnsz4sV6; Tue, 1 Oct 2024 01:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745535; 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=MS9jUI1bNHtfUkhUZ3ARf3KWGUH7so8yn3WBuykhjrI=; b=U8WGSWV3atVosSe9mQauJXlMDEZ6oILo49q4hRosqaPBrDjd9vutcghamAiCBIiBF+OFS9 UOwJr3ggUfr9XlNeVJ5Pk2Ih/BV9ut5+I41DY48j+9PMH1DzFoU0fWRE4uxGpkMGc5+qWW d4f8h4TvCxvaCqig6B/i3rqznLZ0kpSYHvjvmbxiaKGtFiGtRbS217qlFH5iE9dCVF9emQ DXMFZoXYnjOGknk/5pkzCN9rEOFQeHank+L0pSSC1DEeJeC0KzaoXDqamjzbbhOVdTCU1j 7ObIjz14W0MNjkll4kriYlgeIuquUH7cuxv1zS0LQEZehJXSWAFVSR7VkTTRKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727745535; 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=MS9jUI1bNHtfUkhUZ3ARf3KWGUH7so8yn3WBuykhjrI=; b=SqUyELe7dQ9uCujYAWyd5HR19ZsdMrV/pbLgXU2hiITxyVtUAroYTF9Rj27KDBDKhiWKA2 5tkzq9oVY2JlqWwAzJ0zlJUMjH9ZBl1WonIQtZUL2gSftfqovYNNgZWBThemU3Ljqrulw3 g/e9zyrFWpKFGQqw8AhDDYiEwxDIRk0ZdLBKsRXwnU/242xr75JxGWR2QFyvX0vkYJFjzq rWcLgCLq6ZNNyr7OKF4nd5l0SuRrL78pW/6e8dfIhJCOFX5QVoGKz0WUZ88M3JOD05qqH3 1+WQSa/youZEG8kShFFrsJQM6pG80i8OZ4T5PqukZGeUsI8RjLg+UFF2/Gn8bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727745535; a=rsa-sha256; cv=none; b=Ar3WR6xA9aO4/Qtbu1D4/fpvfmaI0s2cCKxaeboKj1A3GEdy98A9Hqz2HkNNfPn7r0kzOT /vVlsR/fkQDTAAz7rfQvgnBwO6DHYyhdLr8s8ZjzXLC1VDuxsC7kWQHLPDdWN8zNVfXjXf YTDDQsBJQpsYzXJwIf6rxzDofZZU7HCJWVfqPApCcXKnZX9G90euQVDVwb6HmB/mEXXXfX I+dsAjPI/ZfT48P/kDooZZzkgmDzRCQqlLEZVPbCVnbxs5E8UpU1fnQ24+UQKJYwXpfLvu JWpixIJPK+JQLDsbIUXVUTgWjfsMyg2MRPcdcZC/UnUKghWroRAmGkOhsYw6dQ== 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 4XHg7g3Np0zGyN; Tue, 1 Oct 2024 01:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4911ItCf016594; Tue, 1 Oct 2024 01:18:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4911ItK0016591; Tue, 1 Oct 2024 01:18:55 GMT (envelope-from git) Date: Tue, 1 Oct 2024 01:18:55 GMT Message-Id: <202410010118.4911ItK0016591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 047870a3b1af - stable/13 - libm: add parens to clarify expressions in fma, fmal 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 047870a3b1afca73ecc777376e658c68b23ef975 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=047870a3b1afca73ecc777376e658c68b23ef975 commit 047870a3b1afca73ecc777376e658c68b23ef975 Author: Ed Maste AuthorDate: 2024-06-18 01:30:44 +0000 Commit: Ed Maste CommitDate: 2024-10-01 01:18:15 +0000 libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD (cherry picked from commit 001606523a48ca2aa440c985db47327a00671358) (cherry picked from commit d1d8c9114751ee481aa6ff980caa2640f8d6848d) --- lib/msun/src/s_fma.c | 6 +++--- lib/msun/src/s_fmal.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index a3dff85a430a..017067c6c92a 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -223,17 +223,17 @@ fma(double x, double y, double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafter(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafter(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafter(z, INFINITY)); else return (z); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 20ff2886565b..acaaaaf3678d 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -204,17 +204,17 @@ fmal(long double x, long double y, long double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafterl(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafterl(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafterl(z, INFINITY)); else return (z);