title: My floating point number has extra digits when I print it
body: <p>I define a floating point number as <code>float transparency = 0.85f;</code> And in the next line, I pass it to a function -- <code>fcn_name(transparency)</code> -- but it turns out that the variable <code>transparency</code> has value <code>0.850000002</code>, and when I print it with the default setting, it is <code>0.850000002</code>. For the value <code>0.65f</code>, it is <code>0.649999998</code>.</p>
  
  <p>How can I avoid this issue? I know floating point is just an approximation, but if I define a float with just a few decimals, how can I make sure it is not changed?</p>