<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 238</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="238"></A><H4>238.
  
Precision and accuracy constraints on floating point
</H4>
<B>Section: </B>Clause 7&#160; [<A href="https://wg21.link/expr">expr</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD4
 &#160;&#160;&#160;

 <B>Submitter: </B>Christophe de Dinechin
 &#160;&#160;&#160;

 <B>Date: </B>31 Jul 2000<BR>


<P>[Adopted at the February, 2016 meeting.]</P>



<P>It is not clear what constraints are placed on a floating point
implementation by the wording of the Standard.  For instance, is
an implementation permitted to generate a "fused multiply-add"
instruction if the result would be different from what would
be obtained by performing the operations separately?  To what
extent does the "as-if" rule allow the kinds of optimizations
(e.g., loop unrolling) performed by FORTRAN compilers?</P>



<P><B>Proposed resolution (September, 2015):</B></P>

<P>Change 6.9.2 [<A href="https://wg21.link/basic.fundamental#8">basic.fundamental</A>] paragraph 8 as follows:</P>

<BLOCKQUOTE>

There are three <I>floating point</I>
types: <TT>float</TT>, <TT>double</TT>, and <TT>long double</TT>. The type
<TT>double</TT> provides at least as much precision as <TT>float</TT>, and
the type <TT>long double</TT> provides at least as much precision
as <TT>double</TT>.  The set of values of the type <TT>float</TT> is a
subset of the set of values of the type <TT>double</TT>; the set of values
of the type <TT>double</TT> is a subset of the set of values of the type
<TT>long double</TT>. The value representation of floating-point types is
implementation-defined. <INS>[<I>Note:</I> This International Standard
imposes no requirements on the accuracy of floating-point operations; see
also 17.3 [<A href="https://wg21.link/support.limits">support.limits</A>]. &#8212;<I>end
note</I>]</INS> <I>Integral</I> and <I>floating</I> types are collectively
called <I>arithmetic</I> types. Specializations of the
standard <INS>library</INS> template <TT>std::numeric_limits</TT>
(17.3 [<A href="https://wg21.link/support.limits">support.limits</A>]) shall specify the maximum and minimum values of
each arithmetic type for an implementation.

</BLOCKQUOTE>

<BR><BR>
</BODY>
</HTML>
