title: Different calculation in SQL Server and Excel
body: <p>This is my formula. I put it in a SQL Server stored procedure:</p>
  
  <pre><code>DECLARE @Var01 float
  SET @Var01 = 1164.83 * (1 - 3.3387306 * LOG(0.00459418151829729) + 1.426559 * POWER(LOG(0.00459418151829729),2)) / (1 - 3.4680733 * LOG(0.00459418151829729) + 1.8779192 * POWER(LOG(0.00459418151829729), 2) - 0.21223784 * POWER(LOG(0.00459418151829729), 3) - 0.0035814371 * POWER(LOG(0.00459418151829729), 4) - 0.90903163 * POWER(10, -4) * POWER(LOG(0.00459418151829729), 5)) - 459.67
  </code></pre>
  
  <p>The result is: <code>214.630185149416</code></p>
  
  <p>Then I'm trying to compare to excel, the formula as below:</p>
  
  <pre><code>=1164.83 * (1 - 3.3387306 * LN(0.00459418151829729) + 1.426559 * (LN(0.00459418151829729)) ^ 2) / (1 - 3.4680733 * LN(0.00459418151829729) + 1.8779192 * (LN(0.00459418151829729)) ^ 2 - 0.21223784 * (LN(0.00459418151829729)) ^ 3 - 0.0035814371 * (LN(0.00459418151829729)) ^ 4 - 0.90903163 * 10 ^ -4 * (LN(0.00459418151829729)) ^ 5) - 459.67
  </code></pre>
  
  <p>The result is: <code>211.981432072480</code></p>
  
  <p>The question is, which one is correct? Any Idea? What the calculation is different?</p>