Properly coding the formula
<p>Based on the formula that we have, we have coded this formula but our output does not match the answers. we are not sure where our mistake is located because our values are not correct. we wish to know where the mistake in our code is. </p>

<p><img src="http://i47.tinypic.com/34gad02.png" alt="formula"></p>

<pre><code>import math
# identifiers
x = 890
mu = 900
STD = 1  # (Standard Deviation)
x &lt;= 910
y = (x-mu)/STD
z = y/math.sqrt(2)


print ' Using an accurate integer series to evaluate erf(z)...'
print ('%20s%20s%20s') % ('x', 'F(x)', 'Number of terms')
x = 890
while x &lt;= 910:
    y = (x-mu)/STD
    z = y/math.sqrt(2)
    count = 0
    total = 0.0
    tt = 2*10**(-50)*z
    uu = (math.sqrt(math.pi*2))
    nn = tt/uu
    product = nn # factorials
    term = nn
    while abs(term) &gt; 1.e-20:
        count += 1
        total =+ term
        product *= product*(10**(50)*z**2)/float(count)
        term = product/(2*count + 1)
    gg = (0.5)*(1 + total)
    print ('%20s%18e%14d') % (x, gg, count)
    x = x + 1
</code></pre>
