Don't use float if you can avoid it. The problem here is that %f is treating it as a double when it doesn't have that precision
String input = "33.3";
double num = Double.parseDouble(input);
System.out.printf("num: %f\n",num);
prints
33.300000
This occurs because 33.3f != 33.3 as float has less precision. To see the actual values you can use BigDecimal which covers the actual value precisely.
System.out.println("33.3f = " + new BigDecimal(33.3f));
System.out.println("33.3 = " + new BigDecimal(33.3));
prints
33.3f = 33.299999237060546875
33.3 = 33.2999999999999971578290569595992565155029296875
As you can see the true value represented is slightly too small in both cases. In the case of how %f it shows 6 decimal places even though float is not accurate to 8 decimal places in total. double is accurate to 15-16 decimal places and so you won't see an error unless the value is much larger. e.g. one trillion or more.