title: How do I use decimal (float) in C++?
body: <p>According to <a href="http://en.wikipedia.org/wiki/IEEE_754-2008" rel="nofollow noreferrer">IEEE 754-2008</a> there are</p>
  
  <blockquote>
    <p>There are three binary floating-point basic formats (which can be encoded using 32, 64 or 128 bits) and two decimal floating-point basic formats (which can be encoded using 64 or 128 bits).</p>
  </blockquote>
  
  <p>This chart is under it. In C++ I believe <code>float</code> and <code>double</code> are single and double precision (<code>binary32</code> and <code>binary64</code>).</p>
  
  <pre><code>Name        Common name         Base  Digits E min  E max   Digits  E max
  binary32    Single precision    2     23+1   −126   +127    7.22    38.23
  binary64    Double precision    2     52+1   −1022  +1023   15.95   307.95
  binary128   Quadruple precision 2     112+1  -16382 +16383  34.02   4931.77
  decimal32                       10    7      −95    +96     7       96
  decimal64                       10    16     −383   +384    16      384
  decimal128                      10    34     −6143  +6144   34      6144
  </code></pre>
  
  <p>What class/struct may I use for <code>decimalX</code> and is there something I can use for <code>binary128</code>? Are these classes/structs standard or nonstandard?</p>