Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
153 views
in Python by (178k points)
The Python math module is a powerful tool for performing mathematical operations in Python. With functions for trigonometry, logarithms, exponents, and more, the math module can handle even the most complex calculations. In this module, you can find popular functions such as sin, cos, tan, exp, sqrt, and log, as well as constants such as pi and e. Whether you're working on data analysis, machine learning, or scientific computing, the Python math module is a must-have. Explore the full range of capabilities with the most searched keywords such as Python math module, trigonometry, logarithms, exponents, data analysis, machine learning, and scientific computing.

Please log in or register to answer this question.

1 Answer

+1 vote
by (178k points)

Python math Module

Here is a list of all the Python math module methods and math constants:

Math Methods

  • math.acos(x) - Returns the arc cosine of x, in radians.
  • math.acosh(x) - Returns the inverse hyperbolic cosine of x.
  • math.asin(x) - Returns the arc sine of x, in radians.
  • math.asinh(x) - Returns the inverse hyperbolic sine of x.
  • math.atan(x) - Returns the arc tangent of x, in radians.
  • math.atan2(y, x) - Returns the arc tangent of y/x, in radians.
  • math.atanh(x) - Returns the inverse hyperbolic tangent of x.
  • math.ceil(x) - Returns the smallest integer greater than or equal to x.
  • math.comb(n, k) - Returns the number of ways to choose k items from n items without repetition and without order.
  • math.copysign(x, y) - Returns a float consisting of the magnitude of x and the sign of y.
  • math.cos(x) - Returns the cosine of x radians.
  • math.cosh(x) - Returns the hyperbolic cosine of x.
  • math.degrees(x) - Converts angle x from radians to degrees.
  • math.dist(p, q) - Returns the Euclidean distance between two points p and q.
  • math.erf(x) - Returns the error function of x.
  • math.erfc(x) - Returns the complementary error function of x.
  • math.exp(x) - Returns e raised to the power of x.
  • math.expm1(x) - Returns e raised to the power of x minus 1.
  • math.fabs(x) - Returns the absolute value of x.
  • math.factorial(x) - Returns the factorial of x.
  • math.floor(x) - Returns the largest integer less than or equal to x.
  • math.fmod(x, y) - Returns the remainder of x/y.
  • math.frexp(x) - Returns the mantissa and exponent of x as the pair (m, e).
  • math.fsum(iterable) - Returns an accurate floating point sum of values in the iterable.
  • math.gamma(x) - Returns the gamma function of x.
  • math.gcd(a, b) - Returns the greatest common divisor of the integers a and b.
  • math.hypot(x, y) - Returns the Euclidean norm, sqrt(xx + yy).
  • math.isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) - Determines whether two floating point numbers are close in value.
  • math.isfinite(x) - Determines whether x is a finite floating point number.
  • math.isinf(x) - Determines whether x is positive or negative infinity.
  • math.isnan(x) - Determines whether x is NaN (not a number).
  • math.isqrt(n) - Returns the integer square root of n.
  • math.ldexp(x, i) - Returns x * (2**i).
  • math.lgamma(x) - Returns the natural logarithm of the absolute value of the gamma function of x.
  • math.log(x[, base]) - Returns the natural logarithm of x to the given base.
  • math.log10(x) - Returns the base-10 logarithm of x.
  • math.log1p(x) - Returns the natural logarithm of 1+x.
  • math.log2(x) - Returns the base-2 logarithm of x.
  • math.perm(n, k=None) - Returns the number of ways to choose k items from n items with order and without repetition.
  • math.pow(x, y) - Returns x raised to the power of y.
  • math.prod(iterable, *, start=1) - Returns the product of the values in the iterable.
  • math.radians(x) - Converts angle x from degrees to radians.
  • math.remainder(x, y) - Returns the IEEE 754-style remainder of x and y.
  • math.sin(x) - Returns the sine of x radians.
  • math.sinh(x) - Returns the hyperbolic sine of x.
  • math.sqrt(x) - Returns the square root of x.
  • math.tan(x) - Returns the tangent of x radians.
  • math.tanh(x) - Returns the hyperbolic tangent of x.
  • math.trunc(x) - Returns the integer part of x.

Math Constants

  • math.e - Represents the mathematical constant e (2.718281...).
  • math.inf - Represents positive infinity.
  • math.nan - Represents a floating-point NaN (not a number).
  • math.pi - Represents the mathematical constant pi (3.141592...).
  • math.tau - Represents the mathematical constant tau (6.283185...), which is equal to 2*pi.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Mar 28, 2023 in Python by kvdevika (178k points)
0 votes
1 answer
asked Apr 10, 2023 in Python by kvdevika (178k points)
0 votes
1 answer
0 votes
1 answer
asked Apr 5, 2023 in Python by kvdevika (178k points)

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...