From nobody Mon Jul 15 13:31:33 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 4WN3515XtZz5QxhP; Mon, 15 Jul 2024 13:31:33 +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 4WN35152k4z4mmV; Mon, 15 Jul 2024 13:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721050293; 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=6fTKnjDdPa7c/8+YrIr4m7ZT2z38/MctvXAHaQ5CS7o=; b=Li3c/OURh9ANkkYB9+vamHY/Xkk2U4lGCLkvSUuzTb+MaS0OFHiPk7cZ6ShXkFx3ntTPlq KKGQGD1hbW2vYhabB/OFqlCPWMvXX1a+EgRhXet8DTCXcltN3tKwNDi4+P4uew4XMttsGT dPI9VW6l72PbsxD8S8zDtkKT/eBIoM5PBa7KuYFRI2kAd8CZYCef3vOhxgCkn9xvre2tjg SwhVjVsRa/zOuFbOAXuHEteV4/h2gIHoH+FNpjdtiEtHxS8lOspCh+gzKqti1ao8PdHcp3 ioab3C4Zq7AfqFsWvHlEwQKI+yLkVrfZ8Qf3an4j4+43odz9Ntdg0eMCcUOgpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721050293; a=rsa-sha256; cv=none; b=oqgKr2syNLKP0WoFrlkc5SwGU7QOSL2dziLa34h/B4AhibqBB6iQAo6jR+Tk6gKEy31Pe7 7wlPGbE5ITYEuIFF/Y8yfeiQESU9DwVRab78eRA9Bu4FnYvHLovjb7cySP5SW84tsG9HXN z6kW18TFouz1QEHP8qtt+/ZDswIZjgLB9BuoCsCHAN6NJ6AyFXa90CU3zuk/OPTJiw4sqH luifSx1jRqv+8r8smJK10R/Tlifxop4mob8X8ovDPzJPok9sVAYuwjpXTilLsSuGEW638h vGTm1hHRJh4kK1WZvKLcgJZTZWLJF8zze7ncxeKx9h0tVl439z2B93AJzr78sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721050293; 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=6fTKnjDdPa7c/8+YrIr4m7ZT2z38/MctvXAHaQ5CS7o=; b=tFSQMK7OOoR3G7HivM4iU1oz/U6KaiBfw7CKERJzWWeowFLzCtmo+D/4CUH5RnJRRZGyLU ZK/32+vK5lFK32Dre2BcPQ6pOj0v3fDW6XECRDFs18z7CVHE6QrOl29W0MgmVYu6UYQL9p VnoQ7UHYnTPisviOeY52x2G2cjm5643cvNvGq8YF8VwxsRfmeNCFONANzIfcKjUH5vtyR2 bkqQg+xxujY2qmpmNJh1rG5ODwwfz1NVilbkNFzOK17MB6ZbeYBC5Ceg/8n5EVHgSgSbi3 oX7APK7MUBSay/D9QnTLG1iiPGcBIzVvAmlF5S/MNtoh+AjYH6zOMLQZaV1bUQ== 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 4WN3514f39ztmn; Mon, 15 Jul 2024 13:31:33 +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 46FDVX6M061376; Mon, 15 Jul 2024 13:31:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FDVXkW061373; Mon, 15 Jul 2024 13:31:33 GMT (envelope-from git) Date: Mon, 15 Jul 2024 13:31:33 GMT Message-Id: <202407151331.46FDVXkW061373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 001606523a48 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 001606523a48ca2aa440c985db47327a00671358 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=001606523a48ca2aa440c985db47327a00671358 commit 001606523a48ca2aa440c985db47327a00671358 Author: Ed Maste AuthorDate: 2024-06-18 01:30:44 +0000 Commit: Ed Maste CommitDate: 2024-07-15 13:30:02 +0000 libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD --- 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 16902d321290..6c889a6a46ca 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -222,17 +222,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 9d08bc72e12e..80c835d09c2b 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -203,17 +203,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);