From nobody Tue Aug 06 20:44:09 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 4Wdlf12YCXz5SdBN; Tue, 06 Aug 2024 20:44:09 +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 4Wdlf121Y1z4VCj; Tue, 6 Aug 2024 20:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722977049; 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=+YD1y9wyhLvXWjO4HCXy2mRoolUfC28XzNzEyMuBtt0=; b=rgFShhBcscUBgHB0M2BIUbSOvDWDgThKNXf83c6Z6lUrsi8sj1/NQgVWcu1YvNT1BALmdg 2FtjuQq/Oz823VubNOWsoN76wLfMxfxHT/O8d98NzXmU8i/T9MM8MqDnLaobIAp4FOXqey UgkGH3b75mH+HoFjNFZwLWLa8ecr8OLSJF1Ja5z2ceCTwgt/1hm1BeI88UVqGYBW3m1gQE 7XlfXVKon2U3J99IC52IamwHdKpnxMkLI2iZP+4sSYzXy2cQb/L+Wf5pupTFbQ/aAagZ6g w0I//y49eTQ9sZgcORXjRdZxDH8gPEn7xDrTm0XoLaMS+N4sZq+TSw3CNhr4HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722977049; a=rsa-sha256; cv=none; b=Al0Po1WE8dRBR9ygDjQmm/hRnPSVe7Qr67V0leFq1JygpE8suERXP9bWiRBmdKUwRfGTHW b2hm/Ur6pdsiKjvt33rL1Tl43XFMy7XFLPDHUcMbcM3923q5G6AT7xFKBmakR6oBBij7TM 1wfWz591/N52phZ2K0KXFUk++vco4iiMd1xPijZxp1H4Z7qJq7W2DhMh2RPkN9uomagE2I vwarD7+b3OTItCit8CugWtd0f32qOU1x0c6AKdkW9/wztIGokht1EZsGWruTQKF+SbkJnw fxO/dcHm+A1jBIRnCPAiPjpgwq2v64I/jSkEu7DF+9bcW8AvQ05s9Y4uw0EOcQ== 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=1722977049; 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=+YD1y9wyhLvXWjO4HCXy2mRoolUfC28XzNzEyMuBtt0=; b=GEKyq7949F0NBSV8Efu5LExJJlvMB5war0gCAICgj5jM6YlYz2VwVVfcTe7W+WXHuexp5A FojTUqs6M+QKCgWcEQSXfuT/+ejIvZ7jVSYYbuM+thLVd9j2PlMLJKso1Glsw9p0hCH0ny j3GEsbcEa7pyrNqhLSEzXc7NIdyZmlqA49bTGQPxXHFiHgVILoiaqkjJkNlqGI5aj9TITj us05v6yECRbzQc+skfhQ/+czKNBVQqEdNpHQzdf00LCaPNTWZoj7zHrnFY2EOX8eJ+4j2x EWEJYQiyxD/XYoNgDJaIL4srpV3/zGNOMehksYu+sVsSyPfBGez5kunEF1ZBDw== 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 4Wdlf11cPJzMTb; Tue, 6 Aug 2024 20:44:09 +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 476Ki9xk097857; Tue, 6 Aug 2024 20:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Ki9L1097854; Tue, 6 Aug 2024 20:44:09 GMT (envelope-from git) Date: Tue, 6 Aug 2024 20:44:09 GMT Message-Id: <202408062044.476Ki9L1097854@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: d1d8c9114751 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: d1d8c9114751ee481aa6ff980caa2640f8d6848d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d1d8c9114751ee481aa6ff980caa2640f8d6848d commit d1d8c9114751ee481aa6ff980caa2640f8d6848d Author: Ed Maste AuthorDate: 2024-06-18 01:30:44 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:52 +0000 libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD (cherry picked from commit 001606523a48ca2aa440c985db47327a00671358) --- 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);