# Python Math: Functions in Python Math Module

## In-Built methods of math module:

This module provides the different types of mathematical functions to perform the mathematical operation. This function does not support complex number problems. To solve the complex number problem cmath module is used. There are lots of functions present in this module and all are discussed below:

S.No Math module Description
1 math.ceil(n) It returns the smallest integer that is greater than or equal to n.
2 math.comb(x,k)  It returns the number of possible ways to select k elements from x number of items without any repetition.
3 math.copysign(n,k)  This function returns a float value with the magnitude of n and the sign of k.
4 math.fabs(n)  This function is used to return the absolute value of x.
5 math.factorial(n)  This function is used to return the factorial of n as an integer.
6 math.floor(n)  It returns the largest integer value that is less than or equal to n.
7 math.fmod(n,k)  This function is preferred basically to find out the mod value of floats and n%k is preferred in case of integers.
8 math.frexp(n)  This function is used to return the mantissa and exponent of n as a pair.
9 math.fsum(x)  This function returns the actual floating-point sum of variables that are used in iterable.
10 math.gcd(a,b)  It returns the greatest common divisor or gcd of integer value a and b.
11 math.isclose(a,b)  This function is used to return Boolean values. It returns true if the values of a and b are close to each other and it returns false in other cases.
12 math.isfinite(n)  This function returns True if n value neither infinity nor a NaN and it returns false in other cases.
13 math.isinf(n)  It returns True if the value of x is positive or negative infinity and it returns False in other cases.
14  math.isnan(n) It returns boolean True value if the value of x is not a number and it returns false in other cases.
15 math.isqrt(n)  It returns the square root of a non-negative integer number.
16 math.ldexo(n,i)  This function returns n*(2**i).
17 math.modf(n)  This function returns the integer factorial parts of n.
18 math.perm(n,k)  This function returns the number of possible ways to select k items where k = none, from n items without repetition.
19 math.prod(x, *, start=1)  This function calculates the product of all the elements in x. The default start value of the product is 1.
20 math.remainder(a,b)  This function returns the IEEE 754-style remainder of a with respect to b.
21 math.trunc(n)  It returns the real value of n which is truncated to an integer.
22 math.exp(n)  It returns the value of base e raised to the power n, where the value of e is 2.7182.
23 math.log(n[,base])  This function returns the natural logarithm of n with one argument.
24 math.log10(x)  It returns the logarithmic value of x with base 10.
25 math.pow(a, b)  It returns the value of a raised to power b.
26 math.sqrt(n)  It returns the square root value of n,
27 math.acos(n)  It returns the arc cosine value of n.
28 math.asin(n)  It returns the arc sine value of n.
29 math.tan(n)  It returns the arc tangent of x.
30 math.cos(n)  It returns the cosine value of n.
31 math.dist(a,b)  It returns the Euclidean distance between the two coordinates a and b.
32 math.hypot(*coordinates)   It returns the Euclidean norm of coordinates.
33 math.sin(n)  It returns the sine of n.
34 math.tan(n)  It returns the tangent value of n.
35 math.degrees(n)  It converts the angle n from radians to degree.
37 math.acosh(n)  This function returns the inverse hyperbolic cosine value of n.
38 math.asinh(n)  It returns the inverse hyperbolic sine value of n.
39 math.atanh(n)  It returns the inverse hyperbolic tangent value of n.
40 math.cosh(n)  It returns the hyperbolic cosine value of n.
41 math.sinh(n)  It returns the hyperbolic sine of n.
42 math.tanh(n)  This function returns the hyperbolic tangent of n.
43 math.erf(n)  It returns the error function at n.
44 math.erfc(n)  It returns the complementary error function at n.
45 math.gamma(n)  It returns the gamma function at n.
46 math.lgamma(n)  It returns the natural logarithmic value of the gamma function at n.
47 math.pi(n)  This function consists of the mathematical constant value of pi = 3.141.
48 math.e(n)  This function consists of the mathematical constant value of e = 2.718.
49 math.tau  This function consists of the mathematical constant value of tau = 6.283.
50 math.inf  It represents a floating-point positive infinity.
51 math.nan  It represents floating-point not a number value.