Staging: this is not the live site, pydocs.org.
Numeric and Mathematical Modules
math
Symbols in math
a
- acos
- Return the arc cosine (measured in radians) of x.
- acosh
- Return the inverse hyperbolic cosine of x.
- asin
- Return the arc sine (measured in radians) of x.
- asinh
- Return the inverse hyperbolic sine of x.
- atan
- Return the arc tangent (measured in radians) of x.
- atan2
- Return the arc tangent (measured in radians) of y/x.
- atanh
- Return the inverse hyperbolic tangent of x.
c
- cbrt
- Return the cube root of x.
- ceil
- Return the ceiling of x as an Integral.
- comb
- Number of ways to choose k items from n items without repetition and without order.
- copysign
- Return a float with the magnitude (absolute value) of x but the sign of y.
- cos
- Return the cosine of x (measured in radians).
- cosh
- Return the hyperbolic cosine of x.
d
- degrees
- Convert angle x from radians to degrees.
- dist
- Return the Euclidean distance between two points p and q.
e
- e
- The mathematical constant e = 2.718281…, to available precision.
- erfc
- Complementary error function at x.
- exp
- Return e raised to the power of x.
- exp2
- Return 2 raised to the power of x.
f
- fabs
- Return the absolute value of the float x.
- floor
- Return the floor of x as an Integral.
- fma
- Fused multiply-add operation.
- fmax
- Return the larger of two floating-point arguments.
- fmin
- Return the smaller of two floating-point arguments.
- fmod
- Return fmod(x, y), according to platform C.
- frexp
- Return the mantissa and exponent of x, as pair (m, e).
- fsum
- Return an accurate floating-point sum of values in the iterable seq.
g
- gamma
- Gamma function at x.
- gcd
- Greatest Common Divisor.
h
- hypot
- Multidimensional Euclidean distance from the origin to a point.
i
- inf
- A floating-point positive infinity.
- isclose
- Determine whether two floating-point numbers are close in value.
- isfinite
- Return True if x is neither an infinity nor a NaN, and False otherwise.
- isinf
- Return True if x is a positive or negative infinity, and False otherwise.
- isnan
- Return True if x is a NaN (not a number), and False otherwise.
- isnormal
- Return True if x is normal, and False otherwise.
- isqrt
- Return the integer part of the square root of the input.
- issubnormal
- Return True if x is subnormal, and False otherwise.
l
- lcm
- Least Common Multiple.
- lgamma
- Natural logarithm of absolute value of Gamma function at x.
- log
- Return the logarithm of x to the given base.
- log10
- Return the base 10 logarithm of x.
- log1p
- Return the natural logarithm of 1+x (base e).
- log2
- Return the base 2 logarithm of x.
m
- modf
- Return the fractional and integer parts of x.
n
- nan
- A floating-point “not a number” (NaN) value.
- nextafter
- Return the floating-point value the given number of steps after x towards y.
p
- perm
- Number of ways to choose k items from n items without repetition and with order.
- pi
- The mathematical constant π = 3.141592…, to available precision.
- pow
- Return x**y (x to the power of y).
- prod
- Calculate the product of all the elements in the input iterable.
r
- radians
- Convert angle x from degrees to radians.
- remainder
- Difference between x and the closest integer multiple of y.
s
- signbit
- Return True if the sign of x is negative and False otherwise.
- sin
- Return the sine of x (measured in radians).
- sinh
- Return the hyperbolic sine of x.
- sqrt
- Return the square root of x.
- sumprod
- Return the sum of products of values from two iterables p and q.
t
- tan
- Return the tangent of x (measured in radians).
- tanh
- Return the hyperbolic tangent of x.
- tau
- The mathematical constant τ = 6.283185…, to available precision.
- trunc
- Truncates the Real x to the nearest Integral toward 0.
u
- ulp
- Return the value of the least significant bit of the float x.