title: javascript simple math issue
body: <p>I have a simple math problem in javascript that I can't solve.</p>
  
  <pre><code>var prodajna_avg = parseFloat(vpc - (vpc * (rab_avg / 100))).toFixed(2);
  var nabavna = parseFloat(&lt;?php echo "$nabavna_cijena"; ?&gt;);
  document.getElementById("brutto_avg").textContent = parseFloat(prodajna_avg - nabavna);
  </code></pre>
  
  <p>Problem is in line three. I don't get the correct amount and I don't know why. In first row amount is 5.624,17 and second row is 3.904,54. Third row is returning 5.620,19 for some reason, while it should be 1.719,63.</p>
  
  <p>Can you help me? I'm learning javascript that's why it's a problem for me. </p>
  
  <p>Thanks.</p>