From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CDE9E3857C64; Sat, 29 Aug 2020 18:04:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDE9E3857C64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598724293; bh=fJVvn2mZ0jrtyP8GYIFhT0eFOjcIovieevVvVOczUDY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OxD1vKsabK8Ca5zJXYeubGTR+IrNwlvcKZGsG2yXpSOYGiAUxw+NAd06hGWCmsid4 DE8bgLpbEcTRwO0XPZ/ls329zclAHtxujgDOsuitxCzldw8RACpX4qZypS0l8gaBCX M7qX5TZmpQ1POVi0uojt0o5yewYyVStaVTusAOpI= From: "jvdelisle at charter dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/93727] Fortran 2018: EX edit descriptor Date: Sat, 29 Aug 2020 18:04:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jvdelisle at charter dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Aug 2020 18:04:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93727 --- Comment #4 from jvdelisle at charter dot net --- An Update. I have the front end and runtime parsing for OUTPUT done and am = now looking at the actual implementation. We have the printf series of functio= ns available and can use the %A format specifier to create the hexidecimal flo= at string. I want to note here that on input, apparently the F editing requires one to= be able to READ a hexadecimal float with the F descriptor as well as the EX descriptor. See=20 13.7.2.3.2 part 7. Another aspect I am studying has to do with rounding. On output I assume we must support RU, RD, RN vs truncating. Considering that the purpose of this type of representation of a float is mostly for "looking under the hood" I initially was thinking simple truncation should suffice and if a user does = not know they have not specified enough precision for all hexadecimals, tough beans. After all, in hexadecimal, it is always an exact fit. I am curious = what others think about this. Regardless, we will need a new rounding function to round the hexadecimals before output. On input, obviously we need to do a new read function and for the F descrip= tor we will have to look ahead to identify that it is a hexadecimal before processing it, otherwise it just looks like a bad float.=