Hi all, I came across an interesting behavior in the SAS data step. Essentially, two identical calculations have different results. data indata;
a = 3;
m = 1/a;
n = 1/a;
x = m-n;
y = m-n;
run;
proc print data=indata;
run; The results are below. As you can see, X and Y are different, despite both being set to the same operation of (m-n). I understand that there are issues with floating point values in programming where a subtraction of two identical fractions may not result in 0. My confusion is why x and y are not either both 0 or both the value of -1.8513E-17. Cheers
... View more