<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can SAS Numeric 8 bytes support BEST32.8? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738765#M230493</link>
    <description>&lt;P&gt;&amp;gt; Will it work if the numeric length remained 8 bytes&lt;/P&gt;
&lt;P&gt;To add a brick to the building of knowledge provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;, it depends on what you mean by "work"&lt;/P&gt;
&lt;P&gt;SAS can store numbers up to 1e308, like any 8-byte-storing program on PC/Unix platforms (mainframes are different).&lt;/P&gt;
&lt;P&gt;So yes it will work and you can perform calculations, but precision will be lost. Only the first 15 digits will be exact.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 May 2021 02:50:09 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-05-04T02:50:09Z</dc:date>
    <item>
      <title>Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738521#M230386</link>
      <description>&lt;P&gt;I am new to SAS Programming. Recently my laptop has been formatted and I am still waiting for my IT Team to give me a new&amp;nbsp; SAS installation. Since I have no access to SAS environment, I have a question here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the source (load from csv) has numeric column that has numeric with 32 length and 8 decimal places. For example:&lt;/P&gt;&lt;P&gt;123,456,789,012,345,678,901,234,567,890,12.99995555&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to store the column as numeric because it will be used as a calculation in the next step. Understand that SAS numeric will only supports 8 bytes which translate to max 15 numeric length. Will it work if the numeric length remained 8 bytes but format it as BEST32.8?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope i learn something here. Appreciate your effort in explaining.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 09:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738521#M230386</guid>
      <dc:creator>StickyRoll</dc:creator>
      <dc:date>2021-05-03T09:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738528#M230388</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/376676"&gt;@StickyRoll&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, this won't work. Once you've lost the 40-digits precision by storing the value in an 8-byte numeric variable (typically resulting in a precision of 15-16 decimal digits) there is &lt;EM&gt;no way&lt;/EM&gt; to recover it from that variable. Formats just control how a value is displayed. Also note that the BEST32.8 format (edit: which is actually the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/leforinforref/p1fum54c93f8r0n1wrs5mrb05nzi.htm" target="_blank" rel="noopener"&gt;BEST32. format&lt;/A&gt;) has a &lt;EM&gt;total&lt;/EM&gt; length of 32 characters &lt;EM&gt;including&lt;/EM&gt;&amp;nbsp;the decimal places,&amp;nbsp;the decimal point, a minus sign (if any) and exponential notation (if needed). To avoid loss of information you will need to store the number in a &lt;EM&gt;character&lt;/EM&gt; variable (of sufficient length) and use advanced techniques to perform the "calculation in the next step."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Addendum:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/376676"&gt;@StickyRoll&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;123,456,789,012,345,678,901,234,567,890,12.99995555&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The binary floating-point representation of this number would require (at least) 129 mantissa bits in order to achieve sufficient precision, but only 52 are available in an 8-byte numeric variable under Windows and Unix (see&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/p0ji1unv6thm0dn1gp4t01a1u0g6.htm" target="_blank" rel="noopener"&gt;Numerical Accuracy in SAS Software&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 18:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738528#M230388</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-05-03T18:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738765#M230493</link>
      <description>&lt;P&gt;&amp;gt; Will it work if the numeric length remained 8 bytes&lt;/P&gt;
&lt;P&gt;To add a brick to the building of knowledge provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;, it depends on what you mean by "work"&lt;/P&gt;
&lt;P&gt;SAS can store numbers up to 1e308, like any 8-byte-storing program on PC/Unix platforms (mainframes are different).&lt;/P&gt;
&lt;P&gt;So yes it will work and you can perform calculations, but precision will be lost. Only the first 15 digits will be exact.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 02:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738765#M230493</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-05-04T02:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738770#M230495</link>
      <description>&lt;P&gt;What real world metric does this represent? The number of stars in the universe? The number of atoms that make up the Earth? Total USA debt?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 03:13:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738770#M230495</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-04T03:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738774#M230496</link>
      <description>Don't laugh &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt; we are all paying that debt. &lt;BR /&gt;</description>
      <pubDate>Tue, 04 May 2021 03:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/738774#M230496</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-05-04T03:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/742340#M232180</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i understand correctly, SAS Numeric can only store the precision up to 15 digits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;123,456,789,012.987&lt;/P&gt;&lt;P&gt;123,456,789,0.98765&lt;/P&gt;&lt;P&gt;123,456,78.9876543&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The type is best32..&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 06:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/742340#M232180</guid>
      <dc:creator>StickyRoll</dc:creator>
      <dc:date>2021-05-19T06:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS Numeric 8 bytes support BEST32.8?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/742342#M232182</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;EM&gt;type&amp;nbsp;&lt;/EM&gt;can only be character or numeric.&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;EM&gt;length&lt;/EM&gt; of a numeric variable can be between 3 and 8 (on z/OS mainframes 2 and &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;EM&gt;format&lt;/EM&gt; determines how the value is displayed, it does not have an influence on the precision or the minimum/maximum value that can be stored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, with 8 bytes floating point a maximum of 15 decimal digits can be represented reliably. And, when working with decimal fractions, you will quickly find out that there are a lot of them that result in periodic numbers (infinite number of binary digits) when represented as binary, so you will always have rounding errors there.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 07:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-SAS-Numeric-8-bytes-support-BEST32-8/m-p/742342#M232182</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-19T07:10:02Z</dc:date>
    </item>
  </channel>
</rss>

