Python | cmath.exp() method Last Updated : 05 Sep, 2019 Comments Improve Suggest changes Like Article Like Report With the help of cmath.exp() method, we can find the exponent of any number by passing it to cmath.exp() method. Syntax : cmath.exp(value) Return : Return the exponential value. Example #1 : In this example we can see that by using cmath.exp() method, we are able to get the values of exponent by passing any value to it. Python3 1=1 # importing cmath library import cmath # using cmath.exp() method gfg = cmath.exp(5) print(gfg) Output : (148.4131591025766 + 0j) Example #2 : Python3 1=1 # importing cmath library import cmath # using cmath.exp() method gfg = cmath.exp(-16) print(gfg) Output : (1.1253517471925912e-07+0j) Comment More infoAdvertise with us Next Article Python | cmath.exp() method J Jitender_1998 Follow Improve Article Tags : Python Python math-library Practice Tags : python Similar Reads Python | Decimal exp() method Decimal#exp() : exp() is a Decimal class method which returns the value of the (natural) exponential function e**x at the given number Syntax: Decimal.exp() Parameter: Decimal values Return: the value of the (natural) exponential function e**x at the given number Code #1 : Example for exp() method P 2 min read Python | cmath.log() method With the help of cmath.log() method, we can find the value of log of any number having natural base value by passing it to cmath.log() method. Syntax : cmath.log(value) Return : Return the log value of natural base. Example #1 : In this example we can see that by using cmath.log() method, we are abl 1 min read Python | cmath.log10() method With the help of cmath.log10() method, we can find the value of log of any number having base-10 value by passing it to cmath.log10() method. Syntax : cmath.log10(value) Return : Return the log value of base-10. Example #1 : In this example we can see that by using cmath.log10() method, we are able 1 min read Python | cmath.sqrt() method With the help of cmath.sqrt() method, we can find the value of square root any number by passing it to cmath.sqrt() method. Syntax : cmath.sqrt(value) Return : Return the square root of any value. Example #1 : In this example we can see that by using cmath.sqrt() method, we are able to get the value 1 min read Python: filecmp.cmp() method Filecmp module in Python provides functions to compare files and directories. This module comes under Pythonâs standard utility modules. This module also consider the properties of files and directories for comparison in addition to data in them. filecmp.cmp() method in Python is used to compare two 3 min read Python | Decimal ln() method Decimal#ln() : ln() is a Decimal class method which returns the natural (base e) logarithm of the Decimal value. Syntax: Decimal.ln() Parameter: Decimal values Return: the natural (base e) logarithm of the Decimal value. Code #1 : Example for ln() method Python3 # Python Program explaining # ln() me 2 min read Python | Decimal logb() method Decimal#logb() : logb() is a Decimal class method which returns the adjusted exponent of the Decimal value. Syntax: Decimal.logb() Parameter: Decimal values Return: the adjusted exponent of the Decimal value. Code #1 : Example for logb() method Python3 # Python Program explaining # logb() method # l 2 min read Python - PyTorch exp() method PyTorch torch.exp() method returns a new tensor after getting the exponent of the elements of the input tensor. Syntax: torch.exp(input, out=None) Arguments input: This is input tensor. out: The output tensor. Return: It returns a Tensor. Let's see this concept with the help of few examples: Example 1 min read cmp(list) method in Python cmp(list) is a method specified in Number in Python 2. The comparison of integral numbers have been discussed using cmp(). But many a times, there is a need to compare the entire list that can be composed of similar or different data types. In this case, different case scenarios occur and having kno 4 min read Python | sympy.expand() method With the help of sympy.expand() method, we can expand the mathematical expressions in the form of variables by using sympy.expand() method. Syntax : sympy.expand(expression) Return : Return mathematical expression. Example #1 : In this example we can see that by using sympy.expand() method, we can g 1 min read Like