Javascript rounding issue
<p>I've got a weird maths/rounding problem in Javascript.</p>

<p>The snippet below is a very basic example of the code I'm running. Obviously it's not this exact code, but I'm taking a decimal value from a text box, working out a percentage and taking this away from one.</p>

<pre><code>var ten = "10";
var eight = "8";

alert(1 - (eight/ten));
</code></pre>

<p>The problem is the answer is 0.2 but the calculation returns 0.1999999999999996. Yet if I do 1 + (eight/ten) 1.8 is returned. What is going on?</p>
