Quote Originally Posted by mackrackit
You could have

Code:
y=26
x = (1000*y/21)//1000
The above will only work if "y" is an integer 22 through 41.
I'm not sure why any value 0 - 65 will not satisfy your equation. The only requirement to keep it "legal" is to keep 1000*y under 65535. Also if you can afford to loose one digit after the decimal point (0.00x) then the range for y will be 0 – 650.
I guess knowing more about the application will help make the best decision.

Regards,

Nick