title: What is the best way to deal with floating point errors?
body: <p>So I have a Javascript script which adds small fractions together in a loop and its possible that it will add 0.2 to 0.1. Then that value is fed to another function but the issue is I need 0.3 to be fed exactly and not 0.30000000000000004.</p>
  
  <p>What is the simplest way to ensure the number is corrected and exact. Note that its possible to get 0.25+0.125 etc being added to simply rounding to 1 decimal won't fix the issue.</p>
  
  <p>It is also possible to have 0.2 + 0.10000000000000004 being added although this is very, very unlikely!</p>