I am trying to get a floating variable accurate to just 3 decimal points for a comparison calculation. I am trying the method below, but it doesn\'t work. I can\'t see why not,
When you perform
fbb = bb/1000;
It treats operation as int/int and returns an int. its demotion of value.
Also take long bb; instead of int as int has value 32767 as its high value.
long bb;
Try
fbb = bb/1000.000;
or
fbb = (double)bb/1000;