r+=p end return r end #plot the results #define a range epsilon = 1e-3 t = range(epsilon,1,lenght=20) #define the approximation r(x,N) = (x^(N+1)/fatctorial(N+1)) # define the difference h(x,N) = exp(x)-g(x,N) # plot