Python has math library and has many functions regarding it. One such function is exp(). This method is used to calculate the power of e i.e. e^y or we can say exponential of y. The value of e is approximately equal to 2.71828…..
Syntax : math.exp(y)
y [Required] – It is any valid python number either positive or negative.
Note that if y has value other than number then its return error.
Returns: Returns floating point number by calculating e^y.
Code # 1:
54.598150033144236 0.049787068367863944 1.0
Code #3: TypeError
Traceback (most recent call last): File "/home/c7ae4f1bef0ed8c7756b3f55e7d2ce81.py", line 6, in print (math.exp("25")) TypeError: a float is required
- Python math library | expm1() method
- Python math library | isnan() method
- Python math library | isfinite() and remainder() method
- Python math library | isclose() method
- Python math library | gamma() function
- Python | Tensorflow exp() method
- Python | cmath.exp() method
- Python | Decimal exp() method
- Python - PyTorch exp() method
- numpy.exp() in Python
- Python - tensorflow.raw_ops.Exp()
- Calculate exp(x) - 1 for all elements in a given NumPy array
- Python - Read blob object in python using wand library
- Learning Model Building in Scikit-learn : A Python Machine Learning Library
- Pytube | Python library to download youtube videos
- Python Faker Library
- FuzzyWuzzy Python library
- Python | Schedule Library
- Python | Holidays library
- Python | Visualize missing values (NaN) values using Missingno Library
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.