I have a mathematical problem with C. For some reason the variables x and y in the code below are not exactly equal all of the time. I believe that the problem has to do with casting. How, exactly do I cast the equations for x and y so that they are always equal?

Code:long x, y, w; double a, b; x = a*w/b+0.5;