Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

I want to write a function that takes a single floating-point parameter x and returns the value of the function e(to the power of x). Using the Taylor series expansion to compute the return value, using a loop that terminates when the partial sum SN+1 of Eq. (2) is equal to SN.

1 Answer

0 votes
by (106k points)

To creating an exponential function in Python you can use exp() or pow () function.

import math 

math.exp(x) 

math.pow(x, y) 

To know more about this you can have a look at the following video tutorial:-

Related questions

Browse Categories

...