<?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/290063#M59962</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13883"&gt;@mike_jones_SAS﻿&lt;/a&gt;, it's great having you in this discussion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a qualitative difference between reading the same value for numbers that differ by less than a small amount and reading different values for numbers that are the same. Further, I would expect that numbers that round to the same value would be represented by the same value. &lt;BR /&gt;Take Pi for example. Whether I expand it to 20 or 30 decimals, it should always be equal to CONSTANT("PI") in a 15-16 decimal representation. But it isn't:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;63   data _null_;
64   decimals = 10;
65   do pi =
66        3.1415926536
67       ,3.14159265359
68       ,3.141592653590
69       ,3.1415926535898
70       ,3.14159265358979
71       ,3.141592653589793
72       ,3.1415926535897932
73       ,3.14159265358979324
74       ,3.141592653589793238
75       ,3.1415926535897932385
76       ,3.14159265358979323846
77       ,3.141592653589793238463
78       ,3.1415926535897932384626
79       ,3.14159265358979323846264
80       ,3.141592653589793238462643
81       ,3.1415926535897932384626434
82       ,3.14159265358979323846264338
83       ,3.141592653589793238462643383
84       ,3.1415926535897932384626433833
85       ,3.14159265358979323846264338328
86       ,3.141592653589793238462643383280
87       ,3.1415926535897932384626433832795
88       ,3.14159265358979323846264338327950
89       ,3.141592653589793238462643383279503
90       ,3.1415926535897932384626433832795029
91       ,3.14159265358979323846264338327950288
92       ,3.141592653589793238462643383279502884
93       ,3.1415926535897932384626433832795028842
94       ,3.14159265358979323846264338327950288420
95       ,3.141592653589793238462643383279502884197
96       ,3.1415926535897932384626433832795028841972
97       ,3.14159265358979323846264338327950288419717
98       ,3.141592653589793238462643383279502884197169
99       ,3.1415926535897932384626433832795028841971694
100      ,3.14159265358979323846264338327950288419716939
101      ,3.141592653589793238462643383279502884197169400
102      ,3.1415926535897932384626433832795028841971693994
103      ,3.14159265358979323846264338327950288419716939938
104      ,3.141592653589793238462643383279502884197169399375
105      ,3.1415926535897932384626433832795028841971693993751
106      ,3.14159265358979323846264338327950288419716939937510;
107      eq = PI = constant("PI");
108      put decimals= eq= PI= hex16.;
109      decimals + 1;
110      end;
111  run;

decimals=10 eq=0 pi=400921FB544486E0
decimals=11 eq=0 pi=400921FB54442EEA
decimals=12 eq=0 pi=400921FB54442EEA
decimals=13 eq=0 pi=400921FB54442D28
decimals=14 eq=0 pi=400921FB54442D11
decimals=15 eq=1 pi=400921FB54442D18
decimals=16 eq=1 pi=400921FB54442D18
decimals=17 eq=1 pi=400921FB54442D18
decimals=18 eq=1 pi=400921FB54442D18
decimals=19 eq=1 pi=400921FB54442D18
decimals=20 eq=1 pi=400921FB54442D18
decimals=21 eq=1 pi=400921FB54442D18
decimals=22 eq=1 pi=400921FB54442D18
decimals=23 eq=0 pi=400921FB54442D19
decimals=24 eq=1 pi=400921FB54442D18
decimals=25 eq=1 pi=400921FB54442D18
decimals=26 eq=1 pi=400921FB54442D18
decimals=27 eq=1 pi=400921FB54442D18
decimals=28 eq=0 pi=400921FB54442D19
decimals=29 eq=0 pi=400921FB54442D19
decimals=30 eq=1 pi=400921FB54442D18
decimals=31 eq=0 pi=400921FB54442D19
decimals=32 eq=0 pi=400921FB54442D19
decimals=33 eq=0 pi=400921FB54442D19
decimals=34 eq=0 pi=400921FB54442D19
decimals=35 eq=0 pi=400921FB54442D19
decimals=36 eq=0 pi=400921FB54442D19
decimals=37 eq=0 pi=400921FB54442D19
decimals=38 eq=0 pi=400921FB54442D19
decimals=39 eq=0 pi=400921FB54442D19
decimals=40 eq=0 pi=400921FB54442D19
decimals=41 eq=0 pi=400921FB54442D19
decimals=42 eq=0 pi=400921FB54442D19
decimals=43 eq=0 pi=400921FB54442D19
decimals=44 eq=0 pi=400921FB54442D19
decimals=45 eq=0 pi=400921FB54442D19
decimals=46 eq=0 pi=400921FB54442D19
decimals=47 eq=0 pi=400921FB54442D19
decimals=48 eq=0 pi=400921FB54442D19
decimals=49 eq=0 pi=400921FB54442D19
decimals=50 eq=0 pi=400921FB54442D19
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2016 02:33:02 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-08-08T02:33:02Z</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>

