<?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: Expected numeric precision behaviour or unexpected issue? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/290023#M59949</link>
    <description>&lt;P&gt;Thank you for your reply &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13883"&gt;@mike_jones_SAS﻿&lt;/a&gt;, I much appreciate your taking the time to provide your expert input here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I fail to see how the floating point representation on the x64 CPU or more generally IEEE floating point representation have anything to do with this.&lt;/P&gt;
&lt;P&gt;SAS Linux on x64 and doesn't have the issue either apparently, according to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;POWER processors also follow the IEEE Standard for Floating-Point arithmetic and yet SAS running on this platform does not exhibit this behaviour.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The floating point representation for 0.5 is 3FE0000000000000. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And for some reason in a few specific,&amp;nbsp;reproducible cases, SAS &lt;STRONG&gt;reads&lt;/STRONG&gt; this number wrongly. SAS could easily store the correct value if it tried. But SAS&amp;nbsp;chooses to store an incorrect value instead, because that's what it's read.&lt;/P&gt;
&lt;P&gt;SAS reads wrongly:&lt;/P&gt;
&lt;P&gt;1- On Windows only&lt;/P&gt;
&lt;P&gt;2- Depending on random changes in the number of non-significant zeros.&lt;/P&gt;
&lt;P&gt;0.50000000000000000000000000 is&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; read correctly by the SAS interpreter&lt;/P&gt;
&lt;P&gt;0.5000000000000000000000000&amp;nbsp;&amp;nbsp; is not read correctly by the SAS interpreter&lt;/P&gt;
&lt;P&gt;0.500000000000000000000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read correctly by the SAS interpreter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All three values are hex value 3FE0000000000000, easily stored in IEEE floating point representation.&lt;/P&gt;
&lt;P&gt;All values are read correctly on all SAS platforms, except for 1)Windows 2) if there are 24 trailing zeros. 23 and 25 are fine.&lt;/P&gt;
&lt;P&gt;Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Aug 2016 10:40:04 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2016-08-07T10:40:04Z</dc:date>
    <item>
      <title>Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287071#M59008</link>
      <description>&lt;P&gt;SAS (WIN9.4)&amp;nbsp;thinks 0.5 is not always equal to 0.5 depending on how it's written.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data TEST;
  %macro loop;
    %do i=0 %to 50;
      NB = 0.5%sysfunc(repeat(0,&amp;amp;i));
      put NB hex16. " L=&amp;amp;i NB=0.5%sysfunc(repeat(0,&amp;amp;i))";
    %end;
  %mend;
  %loop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;writes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=0 NB=0.50&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=1 NB=0.500&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=2 NB=0.5000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=3 NB=0.50000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=4 NB=0.500000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=5 NB=0.5000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=6 NB=0.50000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=7 NB=0.500000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=8 NB=0.5000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=9 NB=0.50000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=10 NB=0.500000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=11 NB=0.5000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=12 NB=0.50000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=13 NB=0.500000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=14 NB=0.5000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=15 NB=0.50000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=16 NB=0.500000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=17 NB=0.5000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=18 NB=0.50000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=19 NB=0.500000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=20 NB=0.5000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=21 NB=0.50000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=22 NB=0.500000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FDFFFFFFFFFFFFE L=23 NB=0.5000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FDFFFFFFFFFFFFE L=24 NB=0.50000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FDFFFFFFFFFFFFF L=25 NB=0.500000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=26 NB=0.5000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=27 NB=0.50000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FDFFFFFFFFFFFFF L=28 NB=0.500000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FDFFFFFFFFFFFFF L=29 NB=0.5000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=30 NB=0.50000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=31 NB=0.500000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=32 NB=0.5000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=33 NB=0.50000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=34 NB=0.500000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=35 NB=0.5000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=36 NB=0.50000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=37 NB=0.500000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=38 NB=0.5000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=39 NB=0.50000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=40 NB=0.500000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=41 NB=0.5000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=42 NB=0.50000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=43 NB=0.500000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=44 NB=0.5000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=45 NB=0.50000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=46 NB=0.500000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=47 NB=0.5000000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=48 NB=0.50000000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=49 NB=0.500000000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;3FE0000000000000 L=50 NB=0.5000000000000000000000000000000000000000000000000000&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, this number is stored as 3FE0000000000000&amp;nbsp;except when L is 23 to 29, where it is sometimes stored as 3FDFFFFFFFFFFFFE&amp;nbsp; or 3FDFFFFFFFFFFFFF.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I reckon this should not be taking place as trailing zeros are not significant.&lt;/P&gt;
&lt;P&gt;The trailing zeros&amp;nbsp;are even less significant (than not significant!) since the trailing zeros causing the issue are well beyond the 16-digit precision offered by SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what do you think? Expected numeric precision (mis)behaviour or unexpected issue?&lt;/P&gt;
&lt;P&gt;I lean towards the second option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this matters as the odd behaviour happens at lengths below 32, which means that formatted values (coming for example from macro variables) will match or not depending on the format used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 02:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287071#M59008</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-26T02:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287075#M59010</link>
      <description>&lt;P&gt;On 32 bit SAS, the problem occurs at L=23 only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;165  data TEST;
166    %macro loop;
167      %do i=0 %to 50;
168        NB = 0.5%sysfunc(repeat(0,&amp;amp;i));
169        V = NB = 0.5;
170        put NB hex16. V 2. " L=&amp;amp;i NB=0.5%sysfunc(repeat(0,&amp;amp;i))";
171      %end;
172    %mend;
173    %loop;
174  run;

3FE0000000000000 1 L=0 NB=0.50
3FE0000000000000 1 L=1 NB=0.500
3FE0000000000000 1 L=2 NB=0.5000
3FE0000000000000 1 L=3 NB=0.50000
3FE0000000000000 1 L=4 NB=0.500000
3FE0000000000000 1 L=5 NB=0.5000000
3FE0000000000000 1 L=6 NB=0.50000000
3FE0000000000000 1 L=7 NB=0.500000000
3FE0000000000000 1 L=8 NB=0.5000000000
3FE0000000000000 1 L=9 NB=0.50000000000
3FE0000000000000 1 L=10 NB=0.500000000000
3FE0000000000000 1 L=11 NB=0.5000000000000
3FE0000000000000 1 L=12 NB=0.50000000000000
3FE0000000000000 1 L=13 NB=0.500000000000000
3FE0000000000000 1 L=14 NB=0.5000000000000000
3FE0000000000000 1 L=15 NB=0.50000000000000000
3FE0000000000000 1 L=16 NB=0.500000000000000000
3FE0000000000000 1 L=17 NB=0.5000000000000000000
3FE0000000000000 1 L=18 NB=0.50000000000000000000
3FE0000000000000 1 L=19 NB=0.500000000000000000000
3FE0000000000000 1 L=20 NB=0.5000000000000000000000
3FE0000000000000 1 L=21 NB=0.50000000000000000000000
3FE0000000000000 1 L=22 NB=0.500000000000000000000000
3FDFFFFFFFFFFFFF 0 L=23 NB=0.5000000000000000000000000
3FE0000000000000 1 L=24 NB=0.50000000000000000000000000
3FE0000000000000 1 L=25 NB=0.500000000000000000000000000
3FE0000000000000 1 L=26 NB=0.5000000000000000000000000000
3FE0000000000000 1 L=27 NB=0.50000000000000000000000000000
3FE0000000000000 1 L=28 NB=0.500000000000000000000000000000
3FE0000000000000 1 L=29 NB=0.5000000000000000000000000000000
3FE0000000000000 1 L=30 NB=0.50000000000000000000000000000000
3FE0000000000000 1 L=31 NB=0.500000000000000000000000000000000
3FE0000000000000 1 L=32 NB=0.5000000000000000000000000000000000
3FE0000000000000 1 L=33 NB=0.50000000000000000000000000000000000
3FE0000000000000 1 L=34 NB=0.500000000000000000000000000000000000
3FE0000000000000 1 L=35 NB=0.5000000000000000000000000000000000000
3FE0000000000000 1 L=36 NB=0.50000000000000000000000000000000000000
3FE0000000000000 1 L=37 NB=0.500000000000000000000000000000000000000
3FE0000000000000 1 L=38 NB=0.5000000000000000000000000000000000000000
3FE0000000000000 1 L=39 NB=0.50000000000000000000000000000000000000000
3FE0000000000000 1 L=40 NB=0.500000000000000000000000000000000000000000
3FE0000000000000 1 L=41 NB=0.5000000000000000000000000000000000000000000
3FE0000000000000 1 L=42 NB=0.50000000000000000000000000000000000000000000
3FE0000000000000 1 L=43 NB=0.500000000000000000000000000000000000000000000
3FE0000000000000 1 L=44 NB=0.5000000000000000000000000000000000000000000000
3FE0000000000000 1 L=45 NB=0.50000000000000000000000000000000000000000000000
3FE0000000000000 1 L=46 NB=0.500000000000000000000000000000000000000000000000
3FE0000000000000 1 L=47 NB=0.5000000000000000000000000000000000000000000000000
3FE0000000000000 1 L=48 NB=0.50000000000000000000000000000000000000000000000000
3FE0000000000000 1 L=49 NB=0.500000000000000000000000000000000000000000000000000
3FE0000000000000 1 L=50 NB=0.5000000000000000000000000000000000000000000000000000
&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 03:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287075#M59010</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-07-26T03:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287078#M59011</link>
      <description>&lt;P&gt;Exactly what version of SAS are you running? &amp;nbsp;It does not do it in Linux with&amp;nbsp;9.4 (TS1M3).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 03:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287078#M59011</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-07-26T03:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287083#M59013</link>
      <description>&lt;P&gt;I get the same as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ﻿&lt;/a&gt;&amp;nbsp;on 64-bit Windows SAS 9.4TS1M2 and&amp;nbsp;&lt;SPAN&gt;SAS 9.4TS1M3.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 04:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287083#M59013</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-07-26T04:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287088#M59015</link>
      <description>&lt;P&gt;Good point. Running 64bits.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 04:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287088#M59015</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-26T04:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287089#M59016</link>
      <description>&lt;P&gt;The fact that we have three different&amp;nbsp;results on three OSes makes me lean even more toward the defect option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 04:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287089#M59016</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-26T04:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287100#M59018</link>
      <description>&lt;P&gt;Just ran your code on SAS 9.2, 64 bit, AIX.&lt;/P&gt;
&lt;P&gt;No error at all, consistent data throughout.&lt;/P&gt;
&lt;P&gt;Suggestion: Trash the sucky pseudo-OS Windows and get a real one for your SAS server.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 06:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287100#M59018</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-07-26T06:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287103#M59019</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;&amp;nbsp;I wish&amp;nbsp;I could Kurt, I wish I could....&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 06:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287103#M59019</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-26T06:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287163#M59043</link>
      <description>&lt;P&gt;This is a recurring topic.&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#p0ji1unv6thm0dn1gp4t01a1u0g6.htm" target="_blank"&gt;Here's good information&lt;/A&gt; about numerical accuracy in SAS programs.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 12:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287163#M59043</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2016-07-26T12:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287165#M59045</link>
      <description>&lt;P&gt;AFAIK, precision-related problems should be the same with SAS on UNIX and Windows. But, as demonstrated here, they are not.&lt;/P&gt;
&lt;P&gt;The fact that the problem here seems only to be present on Windows (as Linux and AIX based SAS versions don't show it), the problem is either in WIndows itself or in the Windows build of SAS.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 12:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287165#M59045</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-07-26T12:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287202#M59056</link>
      <description>&lt;P&gt;To me, this is especially shocking because there shouldn't be any numeric precision involved.&amp;nbsp; 0.5 is a number that can be stored exactly in a binary system, as 0.1 where the first position after the decimal point is the halves column.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 14:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287202#M59056</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-26T14:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287206#M59058</link>
      <description>&lt;P&gt;Report it as a bug to SAS Support.&lt;/P&gt;
&lt;P&gt;It doesn't seem to impact the INPUT() function. Just the interpretation of numeric literals in the code statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 14:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287206#M59058</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-07-26T14:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287371#M59118</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13838"&gt;@Tim_SAS﻿&lt;/a&gt;The link you provide does not address this issue presented here, Tim.&lt;/P&gt;
&lt;P&gt;Hence my question's title.&lt;/P&gt;
&lt;P&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;&amp;nbsp;points out, 0.5 can be represented in binary format as &lt;FONT face="Courier New"&gt;3FE0000000000000x&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;The issue is that SAS reads code/text containing non-significant decimals&amp;nbsp;in a weird (and as it turns out inconsistent across platforms) manner.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:59:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287371#M59118</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-26T22:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287376#M59122</link>
      <description>&lt;P&gt;No issue on mainframe either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4080000000000000 L=0 NB=0.50&lt;/P&gt;
&lt;P&gt;4080000000000000 L=1 NB=0.500&lt;/P&gt;
&lt;P&gt;4080000000000000 L=2 NB=0.5000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=3 NB=0.50000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=4 NB=0.500000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=5 NB=0.5000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=6 NB=0.50000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=7 NB=0.500000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=8 NB=0.5000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=9 NB=0.50000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=10 NB=0.500000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=11 NB=0.5000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=12 NB=0.50000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=13 NB=0.500000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=14 NB=0.5000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=15 NB=0.50000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=16 NB=0.500000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=17 NB=0.5000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=18 NB=0.50000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=19 NB=0.500000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=20 NB=0.5000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=21 NB=0.50000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=22 NB=0.500000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=23 NB=0.5000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=24 NB=0.50000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=25 NB=0.500000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=26 NB=0.5000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=27 NB=0.50000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=28 NB=0.500000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=29 NB=0.5000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=30 NB=0.50000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=31 NB=0.500000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=32 NB=0.5000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=33 NB=0.50000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=34 NB=0.500000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=35 NB=0.5000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=36 NB=0.50000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=37 NB=0.500000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=38 NB=0.5000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=39 NB=0.50000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=40 NB=0.500000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=41 NB=0.5000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=42 NB=0.50000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=43 NB=0.500000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=44 NB=0.5000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=45 NB=0.50000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=46 NB=0.500000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=47 NB=0.5000000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=48 NB=0.50000000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=49 NB=0.500000000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;4080000000000000 L=50 NB=0.5000000000000000000000000000000000000000000000000000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll report it. I hope&amp;nbsp;this is accepted as abnormal. It's a hard battle at times.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 23:52:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287376#M59122</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-26T23:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287449#M59147</link>
      <description>&lt;P&gt;You're right. I replied too quickly. That's what I get for reading SAS Communities before I've had my coffee.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 12:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/287449#M59147</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2016-07-27T12:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288436#M59489</link>
      <description>&lt;P&gt;After many time-consuming message exchanges, I am told&amp;nbsp;by tech support that reading&lt;/P&gt;
&lt;P&gt;X=0.5000000000000000000000000&amp;nbsp;&amp;nbsp; (that's L=23&amp;nbsp;in our discussion)&lt;/P&gt;
&lt;P&gt;as something else than 0.5 is expected behaviour.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If someone else wants to try and report this...&lt;/P&gt;
&lt;P&gt;Sigh...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 01:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288436#M59489</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-08-01T01:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288443#M59491</link>
      <description>&lt;P&gt;I tried your code, and got this result:&lt;/P&gt;&lt;P&gt;V&amp;nbsp;NB&lt;BR /&gt;0&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running on SAS EG 7.12 HF3 (7.100.34000) (64-bit) on window 8.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 03:12:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288443#M59491</guid>
      <dc:creator>Nancy05</dc:creator>
      <dc:date>2016-08-01T03:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288771#M59595</link>
      <description>&lt;P&gt;Will no one try to push this?&lt;/P&gt;
&lt;P&gt;If this is expected behaviour, the expectations are very low, and I hope I'll be retired before they're met... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 23:33:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288771#M59595</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-08-01T23:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288779#M59599</link>
      <description>&lt;P&gt;Did you open a ticket with SAS support? &amp;nbsp;What did they say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 00:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288779#M59599</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-08-02T00:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Expected numeric precision behaviour or unexpected issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288787#M59603</link>
      <description>&lt;P&gt;I was told&amp;nbsp;by tech support that reading&lt;/P&gt;
&lt;P&gt;X=0.5000000000000000000000000&amp;nbsp;&amp;nbsp; (that's L=23&amp;nbsp;in our discussion)&lt;/P&gt;
&lt;P&gt;as not 0.5 is expected behaviour.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 02:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expected-numeric-precision-behaviour-or-unexpected-issue/m-p/288787#M59603</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-08-02T02:43:03Z</dc:date>
    </item>
  </channel>
</rss>

