From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA5633858CDA; Sun, 10 Mar 2024 17:17:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA5633858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710091048; bh=Xc9EfLBA4tJA+6EAMFrT36vrCGZuxTwYuM/XUsupGHs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IaLp1wscSF1tNFSrUWROPwa628A2s5lIYTPr3qMCSMsJv3cuitADJdpbHDmiShHBj oowq2ueFuzrXWoBHGnnKnNjILH5Y3+evsYfkmnX5t3DNTT4Eizh43a2xjCFOYrn4iL fZWgJKTpfhgmRjUSNt1XSQzThY7gC1wtObOKXAfw= From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/93727] Fortran 2018: EX edit descriptor Date: Sun, 10 Mar 2024 17:17:28 +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: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: jvdelisle 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=3D93727 --- Comment #7 from Jerry DeLisle --- (In reply to Thomas Henlich from comment #6) --- snip --- > Just some thoughts: >=20 > Have you tried "%LA" for long double? >=20 > Have you tried quadmath_snprintf > (https://gcc.gnu.org/onlinedocs/libquadmath/quadmath_005fsnprintf.html) w= ith > "%QA" for quad precision? That was the hint I needed. #include int main() { float x =3D 1.0f / 3.0f; double y =3D 1.0l / 3.0l; long double z =3D 1.0L / 3.0L; printf(" FLOAT: %.18A\n", x); printf(" DOUBLE: %.18lA\n", y); printf("LONG DBL: %.18LA\n", z); printf(" 123456789012345678901234567890\n"); printf(" FLOAT: %.20f\n", x); printf(" DOUBLE: %.20lf\n", y); printf("LONG DBL: %.20Lf\n", z); } $ gcc hexfloat.c=20 $ ./a.out=20 FLOAT: 0X1.555556000000000000P-2 DOUBLE: 0X1.555555555555500000P-2 LONG DBL: 0XA.AAAAAAAAAAAAAAB000P-5 123456789012345678901234567890 FLOAT: 0.33333334326744079590 DOUBLE: 0.33333333333333331483 LONG DBL: 0.33333333333333333334 I will check the libqudmath version as well. Thanks.=