Changeset 83520


Ignore:
Timestamp:
Mar 22, 2013, 4:58:56 PM (6 years ago)
Author:
Paul A. Bristow
Message:

Updates to meet comments from Chris and John 21 Mar 13

Location:
sandbox/precision/libs/precision/doc
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • sandbox/precision/libs/precision/doc/html/index.html

    r83515 r83520  
    22<head>
    33<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    4 <title>Specification of Precision of Floating-point and Integer Types</title>
     4<title>Specific-Width Floating-Point Types</title>
    55<link rel="stylesheet" href="./boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="index.html" title="Specific-Width Floating-Point Types">
    88<link rel="next" href="precision/abstract.html" title="Abstract">
    99</head>
     
    2323<div>
    2424<div><h2 class="title">
    25 <a name="precision"></a>Specification of Precision of Floating-point and Integer Types</h2></div>
     25<a name="precision"></a>Specific-Width Floating-Point Types</h2></div>
    2626<div><div class="authorgroup">
    2727<div class="author"><h3 class="author">
     
    3131<span class="firstname">Christopher</span> <span class="surname">Kormanyos</span>
    3232</h3></div>
     33<div class="author"><h3 class="author">
     34<span class="firstname">John</span> <span class="surname">Maddock</span>
     35</h3></div>
    3336</div></div>
    34 <div><p class="copyright">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos</p></div>
     37<div><p class="copyright">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock</p></div>
    3538<div><div class="legalnotice">
    3639<a name="precision.legal"></a><p>
     
    5255<dt><span class="section"><a href="precision/precision.html">Specifying Precision</a></span></dt>
    5356<dd><dl>
    54 <dt><span class="section"><a href="precision/precision/integerfixedtypes.html">Existing Fixed
     57<dt><span class="section"><a href="precision/precision/integerfixedtypes.html">Existing Specific
    5558      precision integer types</a></span></dt>
    5659<dt><span class="section"><a href="precision/precision/newfloattypes.html">Proposed new section</a></span></dt>
     
    6164</div>
    6265<p>
    63     ISO/IEC JTC1 SC22 WG21 N??? - 2013-4-??
     66    ISO/IEC JTC1 SC22 WG21/SG6 Numerics N??? - 2013-4-??
    6467  </p>
    6568<div class="important"><table border="0" summary="Important">
     
    8386</div>
    8487<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    85 <td align="left"><p><small>Last revised: March 21, 2013 at 14:51:14 GMT</small></p></td>
     88<td align="left"><p><small>Last revised: March 22, 2013 at 16:57:47 GMT</small></p></td>
    8689<td align="right"><div class="copyright-footer"></div></td>
    8790</tr></table>
  • sandbox/precision/libs/precision/doc/html/precision/abstract.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    9 <link rel="prev" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
     9<link rel="prev" href="../index.html" title="Specific-Width Floating-Point Types">
    1010<link rel="next" href="background.html" title="Background">
    1111</head>
     
    2828</h2></div></div></div>
    2929<p>
    30       It is proposed to add several optional typedefs with fixed precisions for floating-point
    31       types including <code class="computeroutput"><span class="identifier">float32_t</span><span class="special">,</span>
    32       <span class="identifier">float64_t</span> <span class="identifier">_float128_t</span></code>
    33       (similar to <code class="computeroutput"><span class="identifier">int64_t</span></code> for integer
    34       types).
     30      It is proposed to add several optional typedefs with specific precisions for
     31      floating-point types including <code class="computeroutput"><span class="identifier">float32_t</span><span class="special">,</span> <span class="identifier">float64_t</span> <span class="identifier">_float128_t</span></code> (similar to <code class="computeroutput"><span class="identifier">int64_t</span></code>
     32      for integer types).
    3533    </p>
    3634<p>
     
    4442    </p>
    4543<p>
    46       The objectives are to makes it easier to use higher-precision, to reduce errors
    47       in precision, and to improve portability.
     44      The objectives are to:
    4845    </p>
     46<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
     47<li class="listitem">
     48          Make it easier to use higher-precision.
     49        </li>
     50<li class="listitem">
     51          Reduce errors in precision.
     52        </li>
     53<li class="listitem">
     54          Improve portability.
     55        </li>
     56</ul></div>
    4957</div>
    5058<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    5159<td align="left"></td>
    52 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     60<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    5361        Distributed under the Boost Software License, Version 1.0. (See accompanying
    5462        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/background.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
    99<link rel="prev" href="abstract.html" title="Abstract">
    1010<link rel="next" href="introduction.html" title="Introduction">
     
    6666    </p>
    6767<p>
    68       Of coure, moving away from hardware supported types to software using templates
     68      Of coure, moving away from hardware supported types to software using C++ templates
    6969      carries a small price at compile-time, and a much bigger price at runtime.
    7070    </p>
     
    8787<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    8888<td align="left"></td>
    89 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     89<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    9090        Distributed under the Boost Software License, Version 1.0. (See accompanying
    9191        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/introduction.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
    99<link rel="prev" href="background.html" title="Background">
    1010<link rel="next" href="suffixes.html" title="How to specify extended precision constants - Q?">
     
    3030      These developments have also revealed a need for more standard ways to specify
    3131      precision, especially for extended precision, and to improve portability and
    32       give more confidence that the actual precision can be predicted. For example,
    33       support has been expressed on the <a href="http://lists.boost.org/Archives/boost/2013/03/201786.php" target="_top">Boost
    34       list discussion of precise floating-point types</a>
     32      give more confidence that the actual precision can be exactly predicted. For
     33      example, support has been expressed on the <a href="http://lists.boost.org/Archives/boost/2013/03/201786.php" target="_top">Boost
     34      list discussion of precise floating-point types</a>.
    3535    </p>
    3636<p>
    3737      The reasons for this need are analogous to those that led to the introduction
    38       of fixed integer size like <code class="computeroutput"><span class="identifier">int64_t</span></code>.
     38      of specific integer size like <code class="computeroutput"><span class="identifier">int64_t</span></code>.
     39    </p>
     40<p>
     41      (Although Section 22.3 in the book "The C++ Standard Library Extensions",
     42      P. Becker, Addison Wesley 2007, ISBN 0-321-41299-0, the section is called "Fixed-Size
     43      Integer Types", used of the descriptor <span class="emphasis"><em>fixed</em></span> has
     44      lead to some confusion. So the descriptor <span class="emphasis"><em>specific</em></span> is
     45      here used to match the wording of C99 in the section on <code class="computeroutput"><span class="identifier">int_64_t</span>
     46      <span class="special">...</span></code> in <code class="computeroutput"><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span></code>.)
    3947    </p>
    4048<p>
     
    4755      Similar specification of fixed-size floating-point types could potentially
    4856      improve the C++ language significantly, especially in the scientific and engineering
    49       communities.
     57      communities where other languages have found benefit from types that conform
     58      exactly to the <a href="http://en.wikipedia.org/wiki/IEEE_floating_point" target="_top">IEEE_
     59      floating-point format</a>.
    5060    </p>
    5161<p>
    52       One example of how fixed-size integer types have proved invaluable is described
     62      One example of how specific-size integer types have proved invaluable is described
    5363      by Robert Ramey <a href="http://lists.boost.org/Archives/boost/2002/11/40432.php" target="_top">Usefulness
    5464      of fixed integer sizes in portability (for Boost serialization library).</a>
     
    7686<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    7787<td align="left"></td>
    78 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     88<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    7989        Distributed under the Boost Software License, Version 1.0. (See accompanying
    8090        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/precision.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
    99<link rel="prev" href="suffixes.html" title="How to specify extended precision constants - Q?">
    10 <link rel="next" href="precision/integerfixedtypes.html" title="Existing Fixed precision integer types">
     10<link rel="next" href="precision/integerfixedtypes.html" title="Existing Specific precision integer types">
    1111</head>
    1212<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
     
    2828</h2></div></div></div>
    2929<div class="toc"><dl>
    30 <dt><span class="section"><a href="precision/integerfixedtypes.html">Existing Fixed
     30<dt><span class="section"><a href="precision/integerfixedtypes.html">Existing Specific
    3131      precision integer types</a></span></dt>
    3232<dt><span class="section"><a href="precision/newfloattypes.html">Proposed new section</a></span></dt>
     
    5050</ul></div>
    5151<p>
    52       The first set above is intuitively coined from IEE754:2008. It is also consistent
    53       with the gist of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">uint32_t</span></code>, et al in so far as the number of
    54       binary digits of <span class="emphasis"><em>significand</em></span> precision is contained within
    55       the name of the data type.
     52      The first set above is intuitively coined from <a href="http://dx.doi.org/10.1109/IEEESTD.2008.4610935" target="_top">IEE754:2008</a>.
     53      It is also consistent with the gist of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">uint32_t</span></code>,
     54      et al in so far as the number of binary digits of <span class="emphasis"><em>significand</em></span>
     55      precision is contained within the name of the data type.
    5656    </p>
    5757<p>
    5858      On the other hand, the second set using the size of the <span class="emphasis"><em>whole type</em></span>
    59       may seem more intuitive to users. The exact layout and number of significand
    60       and exponent bits can be confirmed by checking <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">is_iec559</span>
     59      may probably seem more intuitive to users. The exact layout and number of significand
     60      and exponent bits can be confirmed as IEEE754 by checking <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">is_iec559</span>
    6161      <span class="special">==</span> <span class="keyword">true</span></code>.
    6262    </p>
     
    117117    </p>
    118118<p>
    119       If we wish to ensure that we use all 80 bits to calculate <a href="http://en.wikipedia.org/wiki/Extended_precision" target="_top">Extended
     119      If we wish to ensure that we use all 80 bits available from Intel 8087 chips
     120      to calculate <a href="http://en.wikipedia.org/wiki/Extended_precision" target="_top">Extended
    120121      precision</a> we would use a <code class="computeroutput"><span class="keyword">typedef</span>
    121122      <span class="identifier">float80_t</span></code>.
     
    126127    </p>
    127128<p>
    128       Similarly if a quadrupole precision of 16-byte 128-bit <a href="http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format" target="_top">format</a>
    129       is desired, the specification of <code class="computeroutput"><span class="identifier">float128_t</span></code>
    130       will either direct the compiler to generate code using the hardware, or it
    131       will do this using software emulation. This might be generated by the compiler
    132       for GCC or delegated to a <code class="computeroutput"><span class="identifier">cpp_bin_float_128</span></code>
    133       type (under development for <a href="http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>).
     129      Similarly if a quadrupole precision of 16-byte 128-bit <a href="http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format" target="_top">Quadruple-precision
     130      floating-point format</a> is desired, the specification of <code class="computeroutput"><span class="identifier">float128_t</span></code> will either direct the compiler
     131      to generate code using the hardware, or it will do this using software emulation.
     132      This might be generated by the compiler for GCC or delegated to a <code class="computeroutput"><span class="identifier">cpp_bin_float_128</span></code> type (under development
     133      for <a href="http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>).
    134134    </p>
    135 <p>
    136       <a href="http://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html" target="_top">GNU C supports
    137       additional floating types, <code class="computeroutput"><span class="identifier">__float80</span></code>
    138       and <code class="computeroutput"><span class="identifier">__float128</span></code> to support 80-bit
    139       (XFmode) and 128-bit (TFmode) floating types.</a>
    140     </p>
     135<h5>
     136<a name="precision.precision.h0"></a>
     137      <span class="phrase"><a name="precision.precision.existing_extended_precision_types"></a></span><a class="link" href="precision.html#precision.precision.existing_extended_precision_types">Existing
     138      extended precision types</a>
     139    </h5>
     140<div class="orderedlist"><ol class="orderedlist" type="1">
     141<li class="listitem">
     142          <a href="http://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html" target="_top">GNU
     143          C supports additional floating types, <code class="computeroutput"><span class="identifier">__float80</span></code>
     144          and <code class="computeroutput"><span class="identifier">__float128</span></code> to support
     145          80-bit (XFmode) and 128-bit (TFmode) floating types.</a>
     146        </li>
     147<li class="listitem">
     148          <a href="http://software.intel.com/en-us/forums/topic/358472" target="_top">Extended
     149          or Quad IEEE FP formats</a> by Intel Intel64 mode on Linux (V12.1)
     150          provides 128 bit <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
     151          in C, however it appears that it only provides computation at 80-bit format
     152          giving 64-bit significand precision, and other bits are just padding.
     153        </li>
     154<li class="listitem">
     155          <a href="http://software.intel.com/en-us/forums/topic/358476" target="_top">Intel
     156          FORTRAN REAL*16</a> is an actual 128-bit IEEE quad, emulated in software.
     157          But "I don't know of any plan to implement full C support for 128-bit
     158          IEEE format, although evidently ifort has support libraries." This
     159          is equivalent to the proposed float128_t type.
     160        </li>
     161<li class="listitem">
     162          The 360/85 and follow-on System/370 added support for a 128-bit "extended"
     163          <a href="http://en.wikipedia.org/wiki/Extended_precision#IBM_extended_precision_formats" target="_top">IBM
     164          extended precision formats</a>. These formats are still supported in
     165          the current design, where they are now called the "hexadecimal floating
     166          point" (HFP) formats.
     167        </li>
     168</ol></div>
    141169</div>
    142170<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    143171<td align="left"></td>
    144 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     172<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    145173        Distributed under the Boost Software License, Version 1.0. (See accompanying
    146174        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/precision/integerfixedtypes.html

    r83515 r83520  
    22<head>
    33<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    4 <title>Existing Fixed precision integer types</title>
     4<title>Existing Specific precision integer types</title>
    55<link rel="stylesheet" href="../.././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../../index.html" title="Specific-Width Floating-Point Types">
    88<link rel="up" href="../precision.html" title="Specifying Precision">
    99<link rel="prev" href="../precision.html" title="Specifying Precision">
     
    2525<div class="section precision_precision_integerfixedtypes">
    2626<div class="titlepage"><div><div><h3 class="title">
    27 <a name="precision.precision.integerfixedtypes"></a><a class="link" href="integerfixedtypes.html" title="Existing Fixed precision integer types">Existing Fixed
     27<a name="precision.precision.integerfixedtypes"></a><a class="link" href="integerfixedtypes.html" title="Existing Specific precision integer types">Existing Specific
    2828      precision integer types</a>
    2929</h3></div></div></div>
     
    4545<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    4646<td align="left"></td>
    47 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     47<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    4848        Distributed under the Boost Software License, Version 1.0. (See accompanying
    4949        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/precision/newfloattypes.html

    r83515 r83520  
    55<link rel="stylesheet" href="../.././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../../index.html" title="Specific-Width Floating-Point Types">
    88<link rel="up" href="../precision.html" title="Specifying Precision">
    9 <link rel="prev" href="integerfixedtypes.html" title="Existing Fixed precision integer types">
     9<link rel="prev" href="integerfixedtypes.html" title="Existing Specific precision integer types">
    1010<link rel="next" href="../references.html" title="References">
    1111</head>
     
    3636</tr>
    3737<tr><td align="left" valign="top"><p>
    38           It is not obvious where these typedef should reside. The obvious place
    39           is <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cstdint</span><span class="special">&gt;</span></code> but <code class="computeroutput"><span class="keyword">int</span></code>
    40           implies integer types. (or &lt;cstdfloat&gt;?)
     38          It is not obvious where these <code class="computeroutput"><span class="keyword">typedef</span></code>s
     39          should reside. The obvious place is <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cstdint</span><span class="special">&gt;</span></code>
     40          but <code class="computeroutput"><span class="keyword">int</span></code> implies integer types.
     41          (or a new &lt;cstdfloat&gt;?)
    4142        </p></td></tr>
    4243</table></div>
     
    4647      </p>
    4748<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">std</span> <span class="special">{</span>
    48   <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">integer</span> <span class="identifier">type</span> <span class="identifier">float_32_t</span><span class="special">;</span> <span class="comment">// optional</span>
    49   <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">integer</span> <span class="identifier">type</span> <span class="identifier">float_64_t</span><span class="special">;</span> <span class="comment">// optional</span>
    50   <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">integer</span> <span class="identifier">type</span> <span class="identifier">float_80_t</span><span class="special">;</span> <span class="comment">// optional</span>
    51   <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">integer</span> <span class="identifier">type</span> <span class="identifier">float_128_t</span><span class="special">;</span> <span class="comment">// optional</span>
    52   <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">integer</span> <span class="identifier">type</span> <span class="identifier">float_256_t</span><span class="special">;</span> <span class="comment">// optional</span>
     49  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_16_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     50  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_32_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     51  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_64_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     52  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_80_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     53  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_128_t</span><span class="special">;</span> <span class="comment">// optional.</span>
     54  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_256_t</span><span class="special">;</span> <span class="comment">// optional.</span>
     55  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">floatmax_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     56
     57  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_least16_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     58  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_least32_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     59  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_least64_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     60  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_least80_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     61  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_least128_t</span><span class="special">;</span> <span class="comment">// optional.</span>
     62  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_least256_t</span><span class="special">;</span> <span class="comment">// optional.</span>
     63
     64  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_fast16_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     65  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_fast32_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     66  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_fast64_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     67  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_fast80_t</span><span class="special">;</span>  <span class="comment">// optional.</span>
     68  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_fast128_t</span><span class="special">;</span> <span class="comment">// optional.</span>
     69  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="identifier">floating</span><span class="special">-</span><span class="identifier">point</span> <span class="identifier">type</span> <span class="identifier">float_fast256_t</span><span class="special">;</span> <span class="comment">// optional.</span>
    5370<span class="special">}</span> <span class="comment">// namespace std</span>
    5471</pre>
    55 <div class="note"><table border="0" summary="Note">
    56 <tr>
    57 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
    58 <th align="left">Note</th>
    59 </tr>
    60 <tr><td align="left" valign="top"><p>
    61           Others might also be defined here?
    62         </p></td></tr>
    63 </table></div>
    6472<p>
    6573        It is not proposed to make any change to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>.
     
    6775<p>
    6876        It is obviously highly desirable that <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>
    69         is specialized for all floating or fixed-point types. And experience with
    70         <a href="http://www.boost.org/doc/libs/1_53_0/libs/math/doc/html/index.html" target="_top">Boost.Math</a>
     77        is specialized for all floating-point types. And experience with <a href="http://www.boost.org/doc/libs/1_53_0/libs/math/doc/html/index.html" target="_top">Boost.Math</a>
    7178        and <a href="http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
    7279        is that the normal set of trig and others useful functions is also essential
     
    8087<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    8188<td align="left"></td>
    82 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     89<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    8390        Distributed under the Boost Software License, Version 1.0. (See accompanying
    8491        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/references.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
    99<link rel="prev" href="precision/newfloattypes.html" title="Proposed new section">
    1010<link rel="next" href="version_id.html" title="Version Info">
     
    7979<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    8080<td align="left"></td>
    81 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     81<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    8282        Distributed under the Boost Software License, Version 1.0. (See accompanying
    8383        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/suffixes.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
    99<link rel="prev" href="introduction.html" title="Introduction">
    1010<link rel="next" href="precision.html" title="Specifying Precision">
     
    6666      potential multiprecision types).
    6767    </p>
     68<p>
     69      These are defined in <a href="http://dx.doi.org/10.1109/IEEESTD.2008.4610935" target="_top">IEEE
     70      Standard for Floating-point Arithmetic, IEEE Std 754-2008</a>.
     71    </p>
     72<p>
     73      There are detailed descriptions at <a href="http://en.wikipedia.org/wiki/IEEE_floating_point" target="_top">IEEE_
     74      floating-point format</a>, with more detailed descrptions of each type
     75      at <a href="http://en.wikipedia.org/wiki/Half_precision_floating-point_format" target="_top">IEEE
     76      half-precision floating-point format</a>, <a href="http://en.wikipedia.org/wiki/Single_precision_floating-point_format" target="_top">IEEE
     77      single-precision floating-point format</a>, <a href="http://en.wikipedia.org/wiki/Double_precision_floating-point_format" target="_top">IEEE
     78      double-precision floating-point format</a>, <a href="http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format" target="_top">Quadruple-precision
     79      floating-point format</a>, and <a href="http://en.wikipedia.org/wiki/Extended_precision#IEEE_754_extended_precision_formats" target="_top">IEEE
     80      754 extended precision formats and x86 80-bit Extended Precision Format</a>
     81      and these correspond to the proposed types below <code class="computeroutput"><span class="identifier">float16_t</span></code>
     82      ....
     83    </p>
    6884</div>
    6985<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    7086<td align="left"></td>
    71 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     87<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    7288        Distributed under the Boost Software License, Version 1.0. (See accompanying
    7389        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/html/precision/version_id.html

    r83515 r83520  
    55<link rel="stylesheet" href=".././boostbook.css" type="text/css">
    66<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
    7 <link rel="home" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
    8 <link rel="up" href="../index.html" title="Specification of Precision of Floating-point and Integer Types">
     7<link rel="home" href="../index.html" title="Specific-Width Floating-Point Types">
     8<link rel="up" href="../index.html" title="Specific-Width Floating-Point Types">
    99<link rel="prev" href="references.html" title="References">
    1010</head>
     
    2727</h2></div></div></div>
    2828<p>
    29       Last edit to Quickbook file precision.qbk was at 02:51:14 PM on 2013-Mar-21.
     29      Last edit to Quickbook file precision.qbk was at 04:57:47 PM on 2013-Mar-22.
    3030    </p>
    3131<div class="tip"><table border="0" summary="Tip">
     
    5252<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    5353<td align="left"></td>
    54 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos<p>
     54<td align="right"><div class="copyright-footer">Copyright &#169; 2013 Paul A. Bristow, Christopher Kormanyos, John Maddock<p>
    5555        Distributed under the Boost Software License, Version 1.0. (See accompanying
    5656        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  • sandbox/precision/libs/precision/doc/precision.qbk

    r83515 r83520  
    1 [article Specification of Precision of Floating-point and Integer Types
     1[article Specific-Width Floating-Point Types
    22    [quickbook 1.5]
    33    [id precision]
    4     [copyright 2013 Paul A. Bristow,  Christopher Kormanyos]
     4    [copyright 2013 Paul A. Bristow,  Christopher Kormanyos, John Maddock]
    55    [license
    66        Distributed under the Boost Software License, Version 1.0.
     
    88        [@http://www.boost.org/LICENSE_1_0.txt])
    99    ]
    10     [authors [Bristow, Paul A.], [Kormanyos, Christopher]]
     10    [authors [Bristow, Paul A.], [Kormanyos, Christopher], [Maddock, John]]
    1111    [source-mode c++]
    1212]
    1313
    14 [/purpose paper for C++ ISO standards group WG21.]
     14[/purpose paper for C++ ISO standards group WG21/SG6 numerics.]
    1515
    1616[def __Boost [@http://www.boost.org/ Boost]]
     
    2525[def __MPFR [@http://www.mpfr.org/ GNU MPFR library]]
    2626[def __GMP [@http://gmplib.org/ GNU Multiple Precision Arithmetic Library]]
    27 [def __Boost_multiprecision [@http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/index.html Boost.Multiprecision]]
     27[def __Boost_Multiprecision [@http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/index.html Boost.Multiprecision]]
    2828[def __cpp_dec_float [@http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html cpp_dec_float]]
    2929[def __R [@http://www.r-project.org/ The R Project for Statistical Computing]]
     
    3535[def __Matlab [@http://www.mathworks.co.uk/products/matlab/ MATLAB]]
    3636[def __libquadmath [@http://gcc.gnu.org/onlinedocs/libquadmath/ GCC libquadmath]]
     37[def __Quad [@http://software.intel.com/en-us/forums/topic/358472 Extended or Quad IEEE FP formats]]
     38[def __IEEE754 [@http://dx.doi.org/10.1109/IEEESTD.2008.4610935 IEEE Standard for Floating-point Arithmetic, IEEE Std 754-2008]]
     39
     40[def __IEEE_Half [@http://en.wikipedia.org/wiki/Half_precision_floating-point_format IEEE half-precision floating-point format]]
     41[def __IEEE_Single [@http://en.wikipedia.org/wiki/Single_precision_floating-point_format IEEE single-precision floating-point format]]
     42[def __IEEE_Double [@http://en.wikipedia.org/wiki/Double_precision_floating-point_format IEEE double-precision floating-point format]]
     43[def __IEEE_Quad [@http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format  Quadruple-precision floating-point format]]
     44[def __IEEE_Extended [@http://en.wikipedia.org/wiki/Extended_precision#IEEE_754_extended_precision_formats IEEE 754 extended precision formats and x86 80-bit Extended Precision Format]]
     45[def __IEEE_floating_point [@http://en.wikipedia.org/wiki/IEEE_floating_point IEEE_ floating-point format]]
     46
     47[def __IBM_hexadecimal [@http://en.wikipedia.org/wiki/Extended_precision#IBM_extended_precision_formats IBM extended precision formats]]
     48
     49[def __C_IEEE_2008 [@http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1582.pdf C support for IEEE754:2008 N1582]]
    3750
    3851[include html4_symbols.qbk]
    3952
    40 ISO/IEC JTC1 SC22 WG21 N???  - 2013-4-??
     53ISO/IEC JTC1 SC22 WG21/SG6 Numerics N???  - 2013-4-??
    4154
    4255[important This is NOT an official Boost library.]
     
    4659[section:abstract  Abstract]
    4760
    48 It is proposed to add several optional typedefs with fixed precisions
     61It is proposed to add several optional typedefs with specific precisions
    4962for floating-point types including `float32_t, float64_t _float128_t` (similar to `int64_t` for integer types).
    5063
     
    5366And also to provide additional suffix(es) to specify extended precision constants to suit precisions higher than `long double`.
    5467
    55 The objectives are to makes it easier to use higher-precision, to reduce errors in precision, and to improve portability.
     68The objectives are to:
     69
     70* Make it easier to use higher-precision.
     71* Reduce errors in precision.
     72* Improve portability.
    5673
    5774[endsect] [/section:abstract  Abstract]
     
    7188The __Boost_Math library was accepted into __Boost several years ago.  It implements many of the functions in both documents mentioned above and has become quite widely used.
    7289
    73 With the acceptance and release of __Boost_multiprecision
     90With the acceptance and release of __Boost_Multiprecision
    7491that provides much higher precision than built-in `long double` with
    7592__cpp_dec_float employing a variety of backends including the well-established __GMP and __MPFR libraries
     
    7794from the __e_float library by Christopher Kormanyos and John Maddock.
    7895
    79 Since __Boost_multiprecision and __Boost_Math work seamlessly, allowing a `float_type typedef` to be switched from a built-in type to hundreds of decimal digits; then all the special functions and distributions can be used at any chosen precision.
     96Since __Boost_Multiprecision and __Boost_Math work seamlessly, allowing a `float_type typedef` to be switched from a built-in type to hundreds of decimal digits; then all the special functions and distributions can be used at any chosen precision.
    8097
    8198Other users and domains are finding the need and utility of
     
    93110[section:introduction Introduction]
    94111
    95 These developments have also revealed a need for more standard ways to specify precision, especially for extended precision, and to improve portability and give more confidence that the actual precision can be predicted. For example, support has been expressed on the [@http://lists.boost.org/Archives/boost/2013/03/201786.php Boost list discussion of precise floating-point types]
    96 
    97 The reasons for this need are analogous to those that led to the introduction of fixed integer size like `int64_t`.
     112These developments have also revealed a need for more standard ways to specify precision, especially for extended precision, and to improve portability and give more confidence that the actual precision can be exactly predicted. For example, support has been expressed on the [@http://lists.boost.org/Archives/boost/2013/03/201786.php Boost list discussion of precise floating-point types].
     113
     114The reasons for this need are analogous to those that led to the introduction of specific integer size like `int64_t`.
     115
     116(Although Section 22.3 in the book "The C++ Standard Library Extensions", P. Becker, Addison Wesley 2007, ISBN 0-321-41299-0, the section is called "Fixed-Size Integer Types", used of the descriptor ['fixed] has lead to some confusion. So the descriptor ['specific] is here used to match the wording of C99 in the section on `int_64_t ...` in `stdint.h`.)
    98117
    99118Recent specification of fixed-size integer types
     
    102121
    103122Similar specification of fixed-size floating-point types could potentially improve the C++ language
    104 significantly, especially in the scientific and engineering communities.
    105 
    106 One example of how fixed-size integer types have proved invaluable is described by Robert Ramey
     123significantly, especially in the scientific and engineering communities where other languages have found benefit from types that conform exactly to the __IEEE_floating_point.
     124
     125One example of how specific-size integer types have proved invaluable is described by Robert Ramey
    107126[@http://lists.boost.org/Archives/boost/2002/11/40432.php
    108127Usefulness of fixed integer sizes in portability (for Boost serialization library).]
     
    138157At present, the only way to provide constant values is to use a string to extended-precision type conversion.
    139158
    140 This `from_string` method is used for __Boost_Math, __Boost_multiprecision and __libquadmath, for example.
     159This `from_string` method is used for __Boost_Math, __Boost_Multiprecision and __libquadmath, for example.
    141160
    142161It would also be useful to have a method of interrogating the size of types, similar to that provided by
     
    149168(and possibly even extending beyond these to potential multiprecision types).
    150169
     170These are defined in __IEEE754.
     171
     172There are detailed descriptions at __IEEE_floating_point, with more detailed descrptions of each type at __IEEE_Half, __IEEE_Single, __IEEE_Double, __IEEE_Quad, and __IEEE_Extended and these correspond to the proposed types below `float16_t` ....
     173
    151174[endsect] [/section:suffixes  How to specify extended precision constants - Q?]
    152175
     
    158181* `float32_t, float64_t, float128_t, ...`
    159182
    160 The first set above is intuitively coined from IEE754:2008.
     183The first set above is intuitively coined from [@http://dx.doi.org/10.1109/IEEESTD.2008.4610935 IEE754:2008].
    161184It is also consistent with the gist of `std::uint32_t`, et al
    162185in so far as the number of binary digits of ['significand] precision
    163186is contained within the name of the data type.
    164187
    165 On the other hand, the second set using the size of the ['whole type] may seem more intuitive to users.
    166 The exact layout and number of significand and exponent bits can be confirmed by checking
     188On the other hand, the second set using the size of the ['whole type] may probably seem more intuitive to users.
     189The exact layout and number of significand and exponent bits can be confirmed as IEEE754 by checking
    167190`std::numeric_limits<type>::is_iec559 == true`.
    168191
     
    176199
    177200However the [@http://gcc.gnu.org/wiki/x87note Intel X8087 chipset] does do calculations using internal 80-bit registers, increasing the significand from 53 to 63 bits, and gaining about 3 decimal digits precision from 18 and 21.
    178 
    179201
    180202Some hardware, for example [@http://en.wikipedia.org/wiki/SPARC Sparc], provides a 128-bit quadruple precision floating-point chip.
     
    193215[@http://stackoverflow.com/questions/13525774/clang-and-float128-bug-error Clang float128].
    194216
    195 If we wish to ensure that we use all 80 bits to calculate
     217If we wish to ensure that we use all 80 bits available from Intel 8087 chips to calculate
    196218[@http://en.wikipedia.org/wiki/Extended_precision Extended precision]
    197219we would use a `typedef float80_t`.
     
    199221If the compiler could not generate code this type directly, then it would substitute software emulation, perhaps using a Boost.Multiprecision type `cpp_dec_float_21`.
    200222
    201 Similarly if a quadrupole precision of 16-byte 128-bit
    202 [@http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format format] is desired,
    203 the specification of `float128_t` will either direct the compiler to generate code using the hardware, or it will do this using software emulation. This might be generated by the compiler for GCC or delegated to a `cpp_bin_float_128` type (under development for __Boost_multiprecision).
    204 
    205 [@http://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html   GNU C supports additional floating types, `__float80` and `__float128` to support 80-bit (XFmode) and 128-bit (TFmode) floating types.]
    206 
    207 [section:integerfixedtypes Existing Fixed precision integer types]
     223Similarly if a quadrupole precision of 16-byte 128-bit __IEEE_Quad is desired,
     224the specification of `float128_t` will either direct the compiler to generate code using the hardware, or it will do this using software emulation. This might be generated by the compiler for GCC or delegated to a `cpp_bin_float_128` type (under development for __Boost_Multiprecision).
     225
     226[h4 Existing extended precision types]
     227
     228# [@http://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html   GNU C supports additional floating types, `__float80` and `__float128` to support 80-bit (XFmode) and 128-bit (TFmode) floating types.]
     229
     230# __Quad by Intel Intel64 mode on Linux (V12.1) provides 128 bit `long double` in C, however it appears that it only provides computation at 80-bit format giving 64-bit significand precision, and other bits are just padding.
     231# [@http://software.intel.com/en-us/forums/topic/358476 Intel FORTRAN REAL*16] is an actual 128-bit IEEE quad, emulated in software. But "I don't know of any plan to implement full C support for 128-bit IEEE format, although evidently ifort has support libraries."  This is equivalent to the proposed float128_t type.
     232
     233# The 360/85 and follow-on System/370 added support for a 128-bit "extended" __IBM_hexadecimal. These formats are still supported in the current design, where they are now called the "hexadecimal floating point" (HFP) formats.
     234
     235[section:integerfixedtypes Existing Specific precision integer types]
    20823618.4 Integer types [cstdint]
    209237
     
    224252Add the following text to <cstdint>
    225253
    226 [note It is not obvious where these typedef should reside. The obvious place is `<cstdint>` but `int` implies integer types. (or <cstdfloat>?)
     254[note It is not obvious where these `typedef`s should reside. The obvious place is `<cstdint>` but `int` implies integer types. (or a new <cstdfloat>?)
    227255]
    228256
     
    231259
    232260  namespace std {
    233     typedef signed integer type float_32_t; // optional
    234     typedef signed integer type float_64_t; // optional
    235     typedef signed integer type float_80_t; // optional
    236     typedef signed integer type float_128_t; // optional
    237     typedef signed integer type float_256_t; // optional
     261    typedef signed floating-point type float_16_t;  // optional.
     262    typedef signed floating-point type float_32_t;  // optional.
     263    typedef signed floating-point type float_64_t;  // optional.
     264    typedef signed floating-point type float_80_t;  // optional.
     265    typedef signed floating-point type float_128_t; // optional.
     266    typedef signed floating-point type float_256_t; // optional.
     267    typedef signed floating-point type floatmax_t;  // optional.
     268
     269    typedef signed floating-point type float_least16_t;  // optional.
     270    typedef signed floating-point type float_least32_t;  // optional.
     271    typedef signed floating-point type float_least64_t;  // optional.
     272    typedef signed floating-point type float_least80_t;  // optional.
     273    typedef signed floating-point type float_least128_t; // optional.
     274    typedef signed floating-point type float_least256_t; // optional.
     275
     276    typedef signed floating-point type float_fast16_t;  // optional.
     277    typedef signed floating-point type float_fast32_t;  // optional.
     278    typedef signed floating-point type float_fast64_t;  // optional.
     279    typedef signed floating-point type float_fast80_t;  // optional.
     280    typedef signed floating-point type float_fast128_t; // optional.
     281    typedef signed floating-point type float_fast256_t; // optional.
    238282  } // namespace std
    239283
    240 [note Others might also be defined here?]
    241 
    242284It is not proposed to make any change to `std::numeric_limits`.
    243285
    244 It is obviously highly desirable that `std::numeric_limits` is specialized for all floating or fixed-point types.
    245 And experience with __Boost_Math and __Boost_multiprecision is that the normal set of trig and others useful functions is also essential to make the type useful in real-life.
     286It is obviously highly desirable that `std::numeric_limits` is specialized for all floating-point types.
     287And experience with __Boost_Math and __Boost_Multiprecision is that the normal set of trig and others useful functions is also essential to make the type useful in real-life.
     288
     289
     290
    246291
    247292Programs can then use this to determine if a floating-point type is IEEE 754 using `std::numeric_limits<>::is_iec559`.
     
    270315[@http://dx.doi.org/10.1109/IEEESTD.2008.4610935 IEEE Standard for Floating-point Arithmetic, IEEE Std 754-2008]
    271316
    272 
    273317[@http://www.cesura17.net/~will/Professional/Research/Papers/retrospective.pdf
    274318How to Read Floating Point Numbers Accurately, William D Clinger]
     
    301345  Copyright 2013 Paul A. Bristow
    302346  Copyright 2013 Christopher Kormanyos.
     347  Copyright 2013 John Maddock.
    303348  Distributed under the Boost Software License, Version 1.0.
    304349  (See accompanying file LICENSE_1_0.txt or copy at
Note: See TracChangeset for help on using the changeset viewer.