From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F2083858D28; Mon, 12 Jun 2023 04:57:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F2083858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686545879; bh=WwniipOW0EuKsMiEaqyULmiCFdOFVynl2Usiccq9GH8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NxEauka6fTAuKfLFQTnMNNIm5hLDtsIog0Ihbv9xJvNHUtzbNYzq1TVLvl0dqKsjC l3yNo2TJIo5jkgGuVORoRq5mNWG3YN6LmSQdZ/YyRm32A0fFZ2vmTV6KRnR5fuKwFJ FNa2Y8SRvifCQWEmc3rnbZG1GKYVgZkVXQMCcG4w= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109371] MIN_EXPR/MAX_EXPR is not documented and SMIN/SMAX trapping behavior is not documented Date: Mon, 12 Jun 2023 04:57:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: documentation, internal-improvement X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109371 Hongtao.liu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #1 from Hongtao.liu --- NOTE for ieee-2019, there're extra 8 new floating point min/max functions -----cut from ieee 2019 9.6 Minimum and maximum operations-- SourceFormat minimum(source, source) sourceFormat minimumNumber(source, source) sourceFormat maximum(source, source) sourceFormat maximumNumber(source, source) minimum(x, y) is x if x y, y if y >x, and a quiet NaN if either operand is= a NaN, according to 6.2. For this operation, +0 compares greater than =E2=88=920. Otherwise (i.e., w= hen x=3D y and signs are the same) it is either x or y. maximumNumber(x, y) is x if x >y, y if y >x, and the number if one operand = is a number and the other is a NaN. For this operation, +0 compares greater than =E2=88=920. If= x =3Dy and signs are the same it is either x or y. If both operands are NaNs, a quiet NaN is returned, accor= ding to 6.2. If either operand is a signaling NaN, an invalid operation exception is signaled, but unless both operands are NaNs, the signaling NaN is otherwise ignored and not converted to a qui= et NaN as stated in 6.2 for other operations. 69 Copyright =C2=A9 2019 IEEE. All rights reserved. Authorized licensed use limited to: Intel Corporation via the Virtual Libra= ry. Downloaded on January 04,2023 at 06:43:47 UTC from IEEE Xplore. Restrictions apply.IEEE Std 754-2019 IEEE Standard for Floating-Point Arithmetic =E2=80=95 sourceFormat minimumMagnitude(source, source) sourceFormat minimumMagnitudeNumber(source, source) sourceFormat maximumMagnitude(source, source) sourceFormat maximumMagnitudeNumber(source, source) minimumMagnitude(x, y) is x if |x|< |y|, y if |y|< |x|, otherwise minimum(x, y). minimumMagnitudeNumber(x, y) is x if |x|< |y|, y if |y|< |x|, otherwise minimumNumber(x, y). maximumMagnitude(x, y) is x if |x|> |y|, y if |y|> |x|, otherwise maximum(x, y). maximumMagnitudeNumber(x,y) is x if | x| >| y|, y if | y| >| x|, otherwise maximumNumber(x, y). The preferred exponent is Q(x) if x is the result, Q(y) if y is the result. NOTE=E2=80=94The quantum of the result might differ among implementations w= hen x and y are different representations of the same cohort in decimal floating-point numb= ers.=20 ----------cut ends---------------------- Should we also support new IRs for them, libc has supported all of them. https://sourceware.org/pipermail/libc-alpha/2021-September/131511.html=