Equivalent C# statement for this VB6 operation creating problems
<p>I have this code line in VB:</p>

<pre class="lang-vb prettyprint-override"><code>Dim Sqrt As Double
Sqrt = Radius ^ 2 - (CenterX - X) ^ 2
</code></pre>

<p>The parameters in the statement above are being passed the values below:</p>

<pre class="lang-none prettyprint-override"><code>X=  -7.3725025845036161 Double
CenterX =0.0            Double
Radius= 8.0             Double
</code></pre>

<p>On executing the statement above, the value of <code>Sqrt</code> is below:</p>

<pre class="lang-none prettyprint-override"><code>Sqrt    9.646205641487505   Double
</code></pre>

<p>Now I wrote a similar C# logic using the <code>Math</code> class:</p>

<pre class="lang-cs prettyprint-override"><code>double Sqrt = 0;
Sqrt = Math.Pow(Radius, 2) - Math.Pow((CenterX - X), 2);
</code></pre>

<p>with the same set of values, the output in <code>C#</code> code was:</p>

<pre class="lang-none prettyprint-override"><code>Sqrt    9.6462056414874979  double
</code></pre>

<p>I need help because of this single change in C# code, all my values are getting affected. Is there anything I can do to get the similar value as of the <code>*VB*</code> source?</p>