title: parseDecimal in JavaScript?
body: <p>I have some JS calculations going on.  Since floating point arithmetic often uses close approximations to numbers instead of exact values, if you round these floating point number to fixed precision, you often get slight differences.  When you are dealing with dollars, people don't like these slight differences.  </p>
  
  <p>My problem is outlined in this jsfiddle: <a href="http://jsfiddle.net/rGP8Q/" rel="nofollow noreferrer">http://jsfiddle.net/rGP8Q/</a>.</p>
  
  <p>Does anyone know how I can do math operations (multiplication and addition) without introducing these rounding errors coming from the floating point approximations?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I found this other post which brings up the same problem, and confirms that JS does not have a built in decimal data type: <a href="https://stackoverflow.com/questions/1458633/elegant-workaround-for-javascript-floating-point-number-problem">How to deal with floating point number precision in JavaScript?</a>.</p>
  
  <p>you can see if you JS terminal that </p>
  
  <pre><code>626.175.toFixed(2) == 626.17
  626.185.toFixed(2) == 626.18
  626.195.toFixed(2) == 626.20
  </code></pre>
  
  <p>which is inconsistent.  We need a true decimal data type.</p>