I want to output to calculate the following:

0 - (3/6)logbase2(3/6) = 1/2

I have this in my program:

double ratio = 3/6;
x = x - (ratio * (logbase2(ratio)));

which should equal .5 but I...