I found an old thread about proc freq cumulative percent not adding up to exactly 100, but this is a little different. I am doing a frequency (proc freq noprint with an output data set) where there is only one value of the 'tables' variable in the data so the percent itself (not just the cumulative percent) is 100. It looks like 100 when we view the output data, and if we print it out with a format, even if the format is for example 32.28, we get 100.0000000000000000000000000000. However in an 'if' expression it does not compare as being equal to 100 unless we round it. Why would that be? This is only happening in one of three jobs (same code, different input data). We could add a step to round the value of percent before doing the check for 100, but should that really be necessary? How can we tell under what circumstances it should be necessary to round a percent value of 100% ? thanks!
... View more