From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F6983858C35; Sat, 10 Feb 2024 13:43:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F6983858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707572627; bh=hoNOOlJHE/g7QH6CZSiDF0FkPmpAbRryHu+1npJcYDk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BAqGoUzLbn2U7v9whHPungOppM1vMj5SxsiW3X186EY88dNxGGKE40UCYFtJNp6h6 Y6N0LeiNujTIwCYGNVTaRGfRmXoHjjkY6aUPH1t5TAYfK9IBOqoww0SeoOoKv/mkLg zz+zhu8YhIL+92wSupj7VylXeAc2HH47tLjkU/rQ= From: "newbie-02 at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113455] ROUNDING: IEEE Standard: Missing decimal rounding mode 'nearest, ties away from zero' for decimalxxx datatypes. Date: Sat, 10 Feb 2024 13:43:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: newbie-02 at gmx dot de 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: 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=3D113455 --- Comment #7 from newbie-02 --- > (and GCC doesn't implement the FENV_DEC_ROUND pragma to set a constant ro= unding mode in a particular scope)=20=20 here we are leaving my level of knowledge about internals.=20=20 Let me formulate from a user / programmers perspective:=20=20 Wanted is 'decimal compatible math'. Which is to some degree=20=20 announced and partly fulfilled with _Decimalxxx datatypes.=20=20 Shortcomings are:=20 - requires libdfp ( hard to find and tricky to use ), or=20=20 other library.=20=20 - even with that there are situations where the rounding=20=20 mode isn't respected,=20 thus no system of reliable human compatible math.=20=20 Could and should - IMHO - be improved by implementing=20=20 something in gcc which accounts users wish 'ties away'=20=20 in all situations. Can't say if that is a 'pragma' or=20=20 what else.=20=20 The essential point is to offer a well-rounded system /=20=20 environment that relieves programmers and users from=20=20 being constantly surprised by deviations. And thus set's=20=20 them free from always and anytime having to check for it.=20=20 Too big a wish?=20=20 ( code - compiler - libraries - math shouldn't play=20=20 Larry Laffer )=