The expression is as follows
(ux-uy) == -(unsigned) (y-x)
where x
and y
are random integers and ux
and uy
are declared and defined as follows
unsigned ux = (unsigned) x;
unsigned uy = (unsigned) y;
I tested the expression in c with various numbers and it was correct but I cant prove why it is correct. please explain.