C, and consequently ROBOTC, has some funny rules about calculation precisions and number bases. In the above 'i' and 'x' are both 'int' so "i / x' will be calculated using 'int' arithmetic and will result in '0'. The int value '0' will be converted to a 'float' and stored in 'w'.

You probably thought the result should be 0.66667 and were surprised with the zero value.

If you changed to

then you would get the fractional result. Because the cast of '(float)' applies to 'x' and then the calculation is performed with 'float' precision.