import numpy as np
import matplotlib.pyplot as pt
a = 0.0
x = 1e1 # flip sign
true_f = np.exp(x)
e = []
for i in range(0, 10): # crank up
d = np.prod(
np.arange(1, i+1).astype(np.float))
# series for exp
a += x**i / d
print a, np.exp(x), x**i / d
e.append(abs(true_f-a)/true_f)
pt.semilogy(e)