math – Mathematical functions.
Mathematical functions.
This module implements a subset of the corresponding CPython module,
as described below. For more information, refer to the original
CPython documentation: math
.
The math
module provides some basic mathematical functions for
working with floating-point numbers.
Note: On the pyboard, floating-point numbers have 32-bit precision.
Availability: not available on WiPy. Floating point support required for this module.
Attributes
base of the natural logarithm |
|
the ratio of a circle's circumference to its diameter |
Functions
|
Return the inverse cosine of |
|
Return the inverse hyperbolic cosine of |
|
Return the inverse sine of |
|
Return the inverse hyperbolic sine of |
|
Return the inverse tangent of |
|
Return the principal value of the inverse tangent of |
|
Return the inverse hyperbolic tangent of |
|
Return an integer, being |
|
Return |
|
Return the cosine of |
|
Return the hyperbolic cosine of |
|
Return radians |
|
Return the error function of |
|
Return the complementary error function of |
|
Return the exponential of |
|
Return |
|
Return the absolute value of |
|
Return an integer, being |
|
Return the remainder of |
|
Decomposes a floating-point number into its mantissa and exponent. |
|
Return the gamma function of |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return the natural logarithm of the gamma function of |
|
Return the natural logarithm of |
|
Return the base-10 logarithm of |
|
Return the base-2 logarithm of |
|
Return a tuple of two floats, being the fractional and integral parts of |
|
Returns |
|
Return degrees |
|
Return the sine of |
|
Return the hyperbolic sine of |
|
Return the square root of |
|
Return the tangent of |
|
Return the hyperbolic tangent of |
|
Return an integer, being |
Module Contents
- math.copysign(x, y) Incomplete
Return
x
with the sign ofy
.
- math.degrees(x) Incomplete
Return radians
x
converted to degrees.
- math.erf(x) Incomplete
Return the error function of
x
.
- math.erfc(x) Incomplete
Return the complementary error function of
x
.
- math.expm1(x) Incomplete
Return
exp(x) - 1
.
- math.fabs(x) Incomplete
Return the absolute value of
x
.
- math.fmod(x, y) Incomplete
Return the remainder of
x/y
.
- math.frexp(x) Incomplete
Decomposes a floating-point number into its mantissa and exponent. The returned value is the tuple
(m, e)
such thatx == m * 2**e
exactly. Ifx == 0
then the function returns(0.0, 0)
, otherwise the relation0.5 <= abs(m) < 1
holds.
- math.gamma(x) Incomplete
Return the gamma function of
x
.
- math.ldexp(x, exp) Incomplete
Return
x * (2**exp)
.
- math.modf(x) Tuple
Return a tuple of two floats, being the fractional and integral parts of
x
. Both return values have the same sign asx
.
- math.pow(x, y) Incomplete
Returns
x
to the power ofy
.
- math.radians(x) Incomplete
Return degrees
x
converted to radians.
- math.sqrt(x) Incomplete
Return the square root of
x
.