This code calculates the Taylor series for e^x.