@sbxkoenk is correct, this is a numerical precision issue. Here is more reading: Solved: comparing two values - SAS Support Communities and even more at https://communities.sas.com/t5/SAS-Programming/Formula-evaluates-totals-the-same-set-of-variables-di...
Your value of Z is not -90 because SAS cannot represent some decimals exactly. Decimal values that are not an integer power of 2 cannot be represented exactly. So y=3.6 produces a number that isn't quite 3.6 (can't represent it exactly) and so the value of Z (which uses Y) isn't exactly -90.
If you display the numbers using the HEX format so we can see the exact value, like this
data three;
x=36; y=3.6;
z=(y-x)/x*100;
minusninety=-90;
if z<=-90 then a=1; else a=0;
if a=-90 then flag=1;
run;
proc print data=three;
var x y z minusninety;
format x y z minusninety hex16.;
run;
this is the result, note that variable Z is not exactly equal to the value of variable MINUSNINETY. So then variable A=0 because it is not exactly equal.
Obs x y z minusninety
1 4042000000000000 400CCCCCCCCCCCCD C0567FFFFFFFFFFF C056800000000000
Then flag is missing because it only is assigned a value when A=1, but A=0 so no value is assigned.
I think the best solution is to use the ROUND function like this: if round(z)=-90 as suggest by @Kurt_Bremser here is a better solution which will work in more cases than the INT or FLOOR or CEIL function. In this case INT works but there may be other cases where you are not comparing to an integer, and so INT won't work in those cases but ROUND will.
--
Paige Miller