Python math Module - All Functions and Constants
1. Constants
math.pi: pi (3.14159...)
math.e: e (2.71828...)
math.tau: tau = 2 * pi (6.28318...)
math.inf: Infinity
math.nan: Not a Number (NaN)
2. Number-theoretic and Representation Functions
math.ceil(x): Smallest integer >= x
math.floor(x): Largest integer <= x
math.trunc(x): Truncates decimal part
math.fabs(x): Absolute value (float)
math.factorial(x): x! (x factorial)
math.fmod(x, y): Remainder of x / y (float result)
math.remainder(x, y): IEEE 754-style remainder
math.modf(x): (fractional_part, integer_part) of x
math.isfinite(x): True if x is not inf or NaN
math.isinf(x): True if x is infinity
math.isnan(x): True if x is NaN
math.gcd(x, y): Greatest Common Divisor
math.lcm(x, y): Least Common Multiple (Python 3.9+)
math.copysign(x, y): Returns x with the sign of y
math.isclose(a, b): True if a is close to b (within a tolerance)