You are on page 1of 1

import math as math

import numpy as np
sum=0
for k in range(0,23):
def fact(k):
if k==0 or k==1:
resul=1
elif k>1:
resul=k*fact(k-1)
return resul

sum=sum+ (((-1)**k)*((1.6)**(2*k+1)))/((2*k+1)*fact(k))

erfx=(2/np.sqrt(np.pi))*sum
print(erfx)

You might also like