Introduction
In addition to the various powerful outofthebox capabilities that Python offers, such as supporting multiparadigm programming features and styles, highly performant libraries and community support and an exuberant set of frameworks that are causing shifts and shaping new ideologies in the industry for developing productiongrade software products blazingly quicker than before, the 'math' Python module aids one with an additional set of utility functions and constants that one can leverage for performing complex scientific and mathematical computations.
The principal divisions of the highlevel mathematical calculations utilities that are builtin in the 'math' module include the following aspects:
 Constants

Functional Utilities
Let's understand these functionalities with helpful examples covered in the article.
Also See, Intersection in Python, Swapcase in Python
Read About, Divmod in Python
Constants present in the â€˜mathâ€™ module
In Python, the math module has many constants for using frequently required scientific and mathematical values such as 'inf', 'pi', 'e' etc., while performing calculations that offers ease of use and enhanced precision. Some of these constants defined in the module are
 Pi
 Eulerâ€™s Constant (exponential value)
 Tau
 Infinity
 Not a Number
Pi
The 'pi' mathematical constant, which is equivalently represented as 22/7 or 3.14, generally is covered in the 'math' module as
# First importing the math Library
import math
# copying the value of pie in another variable
pie = math.pi
# diameter of the circle
d = 10
# circumference of the circle
print( pie * d )
Output:
31.41592653589793
Eulerâ€™s Constant
The 'e' mathematical constant, also known as the "Euler's Constant", which is equivalently represented as e = 2.718281â€¦, generally is covered in the 'math' module as
# First importing the math Library
import math
# Then printing the value of the Euler number 'e.'
print (math. e)
Output:
2.718281828459045
Tauâ€™s Constant
The 'Ï„' mathematical value, which is also a circle constant equivalent to 2Ï€, generally is covered in the 'math' module as
# First importing the math Library
import math
# Then printing the value of tau
print (math.tau)
Output:
6.283185307179586
Infinity
The 'math' module has a constant equal to the floatingpoint positive infinity to represent an infinite value, i.e. 'math.inf'.
# First importing the math Library
import math
# Then printing the value of infinity
print (math.inf)
# Comparing float inf with math.inf
print(float("inf") == math.inf)
# Performing arithmetic addition between two infinity values
print(math.inf + math.inf)
Output:
inf
True
inf
Notanumber (NaN)
To represent a nan value, the 'math' module has a constant that can be used to describe the notion of a quantity that is not a number as
# First importing the math Library
import math
# Then printing the value of nan constant in the math module
print (math.nan)
Output:
nan
You can practice by yourself with the help of online python compiler.