Skip to content

Commit a11fc68

Browse files
committed
fp-interop: Apply suggestions from PR review
1 parent 4c79391 commit a11fc68

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

proposals/fp_interop/25-xxx.txt

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ Subject: Requirements and specifications for interoperability with C
44
interchange and extended types
55
Date: 2025-Oct-XX
66

7-
Reference:
7+
References:
8+
ISO/IEC 9899:2024 Programming languages -- C ("C23")
9+
(working draft N3220)
10+
WG5/N2249 Fortran 202Y Work Items
11+
23-176 Add extended floating-point types defined in ISO C23
12+
to ISO_C_BINDING
13+
ISO/IEC 60559:2020 Floating-Point arithmetic
14+
IEEE 754-2019 IEEE Standard for Floating-Point Arithmetic
15+
816

917
1 Background
1018
============
1119

1220
bg01. The ISO C23 specification (ISO/IEC 9899:2024) added support for
13-
interchange and extended floating-point types. The current Fortran
14-
202Y work list WG5/N2249 includes adding interoperability with
15-
these types as accepted work item US05. At meeting #230 in June
16-
2023, J3 accepted paper 23-176 as background/use-case for
17-
additional interchange types.
21+
interchange and extended floating-point types (C23 Annex H). The
22+
current Fortran 202Y work list WG5/N2249 includes adding
23+
interoperability with these types as accepted work item US05. At
24+
meeting #230 in June 2023, J3 accepted paper 23-176 as
25+
background/use-case for additional interchange types.
1826

1927
bg03. This paper contains formal requirements and specifications for
2028
Fortran 202Y proposal US05, "Add extended floating-point types
@@ -23,7 +31,18 @@ bg03. This paper contains formal requirements and specifications for
2331
2 Requirements
2432
==============
2533

26-
rq01. The ISO_C_BINDING module should provide integer named constants
34+
rq01. The C23 standard adds a large number of new types, importing
35+
significant portions of ISO/IEC 60559 (a.k.a IEEE 754) into its
36+
specification. The most important of these for Fortran
37+
interoperability with C are the '_Float16', '_Float32',
38+
'_Float64', and '_Float128' types (and their related complex
39+
types). Requirements rq02-r05 deal with these new types. Many of
40+
the other types, covered by rq07-rq17, are marked as optional and
41+
could be dropped independently while keeping the rest of this
42+
paper. These optional requirements primarily serve to maintain
43+
parity with Annex H of C23.
44+
45+
rq02. The ISO_C_BINDING module should provide integer named constants
2746
for KIND parameters corresponding to the C interchange floating
2847
types '_Float16', '_Float32', '_Float64', and '_Float128'.
2948

@@ -94,7 +113,7 @@ sp02. To the ISO_C_BINDING module, add the following integer named
94113
If the companion processor defines '__STDC_IEC_60559_BFP__' and
95114
'__STDC_IEC_60559_TYPES__', then the constants 'C_FLOAT32' and
96115
'C_FLOAT64' should have the same values as 'C_FLOAT' and
97-
'C_DOUBLE' (C2023 H.2.4.2).
116+
'C_DOUBLE', respectively (C2023 H.2.4.2).
98117

99118
sp05. To the ISO_C_BINDING module, add the following integer named
100119
constants for real KIND parameters:

0 commit comments

Comments
 (0)