The value of 0.3 can internally not be represented exactly as a floating point number. That is the reason you see 0.3000...0001. But when printing that value in an output you perform a rounding operation, for example:
double x = 0.3;
printf ("x = %.2f\n", x);
will print
x = 0.30
just as expected. So printf does the rounding for you.
When dealing internally with floating point numbers I would suggest that you do not try to round them. Do all your calculation and do the rounding at the very end, when outputting the results.