As has been pointed out, when KoLmafia parses the "1/2" expression, it sees two integers and ends up with an integer.
It could be argued that since we know the expression is going to be assigned to a float, the whole expression should be evaluated as floats. Currently, each operator only knows the types of its operands, not the larger context.
On the other hand, what would you expect the following to produce?
Code:
int num = 123;
float fnum = ( num / 7 ) * 7 + ( num % 7 );
print( fnum );
Currently, with nothing but integers on the right side, you get 123.0.
If we did the right side as all floats, you'd get 127.0.
I'm pretty sure that I would expect 123.0...