11-10-2014 11:55 AM
We are in the midst of converting from SAS 9.1 to SAS 9.3. As part of the process we are running sample programs on both systems
with the same data and comparing the results. All the results are in SAS tables.
In one such test there were some errors in the figures where the difference is very small - in the order of 1.3E-13. I know that these
values would affect the outcome because the figures are dollars and cents, but I'm wondering why there is a difference in the first
place? Is this something with version of SAS or perhaps I need to change a option?
I one such case I have over 2 million records in each table and only 1 record is unequal and the difference is -1.31E-14.
Thanks in advance.
11-10-2014 01:34 PM
Perhaps reviewing these two documents will resolve it for you
E-13 is in the range where the floating point processor can produce random errors.
11-10-2014 01:42 PM
If you are using PROC COMPARE to confirm if two SAS tables are the same or not, when you use METHOD = EXACT it is likely to report the very small floating point differences you are seeing. Try METHOD = ABSOLUTE instead and SAS will ignore differences in the precision range.
11-10-2014 01:59 PM
Using METHOD=ABSOLUTE resulted in the same error, but METHOD=RELATIVE passed the record. Seems that the
field in error is 3.72E12 and has a difference of .000488 between files. This is above the CRITERION value of .00001 so
that is why the fields are different.
I must add that the 2 tables were created on 2 different machines running 2 different versions of SAS with different
bitness (on x32 the other x64). I think this contributes to the why some random numbers are a little out of sync.
11-10-2014 02:59 PM
METHOD = ABSOLUTE works for me but I am comparing within the same operating system and my differences are 1E-14 and smaller. Tweeking the CRITERION should give you what you require if you want to avoid reporting "large small differences".