<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 12.02.2014 02:42, schrieb Ralf
      Quint:<br>
    </div>
    <blockquote cite="mid:52FAD17C.6050302@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 2/11/2014 4:53 PM, Martin Frb
        wrote:<br>
      </div>
      <blockquote cite="mid:52FAC619.9020805@mfriebe.de" type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        I am trying to figure out the internal representation of these.
        (So they can be converted, including conversion form sizes not
        present in fpc)<br>
        <br>
        They are all floating point? Pascal has no fixed point?
        (nevertheless, rules for fixed point may also be of interest)<br>
        <br>
        dwarf2 says it is specified in each platforms ABI, but I have
        not found that (not even found the ABI yet).<br>
        Only found: <a moz-do-not-send="true"
          class="moz-txt-link-freetext"
href="http://en.wikipedia.org/wiki/Computer_number_format#Representing_fractions_in_binary">http://en.wikipedia.org/wiki/Computer_number_format#Representing_fractions_in_binary</a><br>
        <br>
        And <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.freepascal.org/docs-html/ref/refsu6.html#x28-310003.1.2">http://www.freepascal.org/docs-html/ref/refsu6.html#x28-310003.1.2</a><br>
        <br>
        <blockquote type="cite">
          <table id="TBL-5" class="tabular" cellpadding="0"
            cellspacing="0">
            <tbody>
              <tr style="vertical-align:baseline;" id="TBL-5-1-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-1-1" class="td11">Type </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-1-2" class="td11"> Range </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-1-3" class="td11">Significant digits</td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-1-4" class="td11"> Size</td>
              </tr>
              <tr class="hline">
                <td>
                  <hr></td>
                <td>
                  <hr></td>
                <td>
                  <hr></td>
                <td>
                  <hr></td>
              </tr>
              <tr style="vertical-align:baseline;" id="TBL-5-2-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-2-1" class="td11">Real </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-2-2" class="td11"> platform dependant </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-2-3" class="td11"> ??? </td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-2-4" class="td11">4 or 8</td>
              </tr>
              <tr style="vertical-align:baseline;" id="TBL-5-3-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-3-1" class="td11">Single </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-3-2" class="td11"> 1.5E-45 .. 3.4E38 </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-3-3" class="td11"> 7-8 </td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-3-4" class="td11"> 4</td>
              </tr>
              <tr style="vertical-align:baseline;" id="TBL-5-4-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-4-1" class="td11">Double </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-4-2" class="td11"> 5.0E-324 .. 1.7E308 </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-4-3" class="td11"> 15-16 </td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-4-4" class="td11"> 8</td>
              </tr>
              <tr style="vertical-align:baseline;" id="TBL-5-5-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-5-1" class="td11">Extended</td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-5-2" class="td11"> 1.9E-4932 .. 1.1E4932 </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-5-3" class="td11"> 19-20 </td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-5-4" class="td11"> 10</td>
              </tr>
              <tr style="vertical-align:baseline;" id="TBL-5-6-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-6-1" class="td11">Comp </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-6-2" class="td11"> -2E64+1 .. 2E63-1 </td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-6-3" class="td11"> 19-20 </td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-6-4" class="td11"> 8</td>
              </tr>
              <tr style="vertical-align:baseline;" id="TBL-5-7-">
                <td style="white-space:nowrap; text-align:left;"
                  id="TBL-5-7-1" class="td11">Currency</td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-7-2" class="td11">-922337203685477.5808 ..
                  922337203685477.5807</td>
                <td style="white-space:nowrap; text-align:center;"
                  id="TBL-5-7-3" class="td11"> 19-20 </td>
                <td style="white-space:nowrap; text-align:right;"
                  id="TBL-5-7-4" class="td11"> 8</td>
              </tr>
            </tbody>
          </table>
        </blockquote>
        apparently there also is real46 (never heard of real16)<br>
        <br>
        The size will actually be in the dwarf, so that I got. <br>
        <br>
        But from that how do I know how many bits are in the exponent?
        (and how many in the number). Apparently it depends on the CPU?
        But where to get the info?<br>
      </blockquote>
      For all but Real48 (not Real46 or Real16), those are conformant
      with IEEE 754 (<a moz-do-not-send="true"
        class="moz-txt-link-freetext"
        href="http://grouper.ieee.org/groups/754/">http://grouper.ieee.org/groups/754/</a>)<br>
      <br>
      Real48 is the non-IEEE754 (predating it) floating point format
      that was used in the early Borland Turbo Pascal...<br>
    </blockquote>
    Please not that FPC declares Real48 (aka Real) as "type Double" (in
    $fpcdir/rtl/inc/systemh.inc) so it does NOT implement it in a TP
    compatible way.<br>
    <br>
    Regards,<br>
    Sven<br>
  </body>
</html>