title: Precision difference in VB6 and VB.NET
body: <p>I got two different result in VB 6 and VB.NET for a same code, which handles division operation. </p>
  
  <pre><code>ABC = 9.999728
  result = IIf(ABC &lt;&gt; 0, 1 / ABC, 10 ^ 10)
  </code></pre>
  
  <p>In VB6, I got result = 0.1000027</p>
  
  <p>In VB.NET, the result is 0.100002721</p>
  
  <p>However, when I use <code>CSng(Val(CStr(result)))</code> in VB.NET, I get 0.1000027.</p>
  
  <p>1) Why VB.NET produces different precision compared to VB6?</p>
  
  <p>2) Why <code>CSng(Val(CStr(result)))</code> produces same precision as VB6?</p>
  
  <p>3) This may look trivial and simple, but this problem is repeated and propagates to my final result, which is different from the equivalent result in VB6. Can I safely assume that VB.NET result is more precise than VB6 and discard the VB6 result completely?  </p>