Keyword Input Parameters

Assignment

The exponential function can be calculated by a series expansion:

Series definition for the exponential function

Write a function that takes a scalar input x and provides scalar output of the exponential function.

A few notes/hints:

Here's an example of the sort of input/output I'd like to see. I'm assuming you have already imported your exponential function and have named it exponential:

>>> print exponential(3.4, tol=1e-8)
29.9641000474

Solution

See the following web page.

Creative Commons License Updated: Friday, 24-Dec-2010 08:44:15 PST. Valid CSS, HTML. Author: Johnny Lin <email address>. Disclaimer. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License.