PYTHON MATH MODULE:
EXAMPLE:
MATH MODULE WITH DIR FUNCTION:
EXAMPLE:
OUTPUT:
['__doc__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'acos',
'acosh',
'asin',
'asinh',
'atan',
'atan2',
'atanh',
'ceil',
'comb',
'copysign',
'cos',
'cosh',
'degrees',
'dist',
'e',
'erf',
'erfc',
'exp',
'expm1',
'fabs',
'factorial',
'floor',
'fmod',
'frexp',
'fsum',
'gamma',
'gcd',
'hypot',
'inf',
'isclose',
'isfinite',
'isinf',
'isnan',
'isqrt',
'ldexp',
'lgamma',
'log',
'log10',
'log1p',
'log2',
'modf',
'nan',
'perm',
'pi',
'pow',
'prod',
'radians',
'remainder',
'sin',
'sinh',
'sqrt',
'tan',
'tanh',
'tau',
'trunc']
DESCRIPTION OF ALL THE FUNCTION PRESENT IN MATH MODULE:
Function |
Description |
ceil(x) |
The lowest integer bigger
than or equal to x is returned. |
copysign(x, y) |
gives x back with the sign
of y. |
fabs(x) |
gives x's absolute value
back. |
factorial(x) |
provides the x factorial
back. |
floor(x) |
gives back the biggest
integer that is less than or equal to x. |
fmod(x, y) |
returns the leftover value
after dividing x by y. |
frexp(x) |
returns the pair of the
mantissa and exponent of x. (m, e) |
fsum(iterable) |
returns the iterable's
correct floating point sum of all values. |
isfinite(x) |
If x is neither an
infinity nor a NaN, it returns True (Not a Number) |
isinf(x) |
If x is a positive or
negative infinity, it returns True. |
isnan(x) |
If x is a NaN, it returns
True. |
ldexp(x, i) |
gives back x * (2**i). |
modf(x) |
gives x's fractional and
integer components back. |
trunc(x) |
x's shortened integer
value is returned. |
exp(x) |
delivers e**x |
expm1(x) |
yields e**x - 1 |
log(x[, b]) |
gives back the x logarithm
in base b. (defaults to e) |
log1p(x) |
the natural logarithm of 1
+ x is returned. |
log2(x) |
gives x's base-2 logarithm
back. |
log10(x) |
provides x's base-10
logarithm. |
pow(x, y) |
gives x raised to the
power of y back. |
sqrt(x) |
gives x's square root
back. |
acos(x) |
gives the arc cosine of x
back. |
asin(x) |
gives the arc sine of x
back. |
atan(x) |
gives the arc tangent of x
back. |
atan2(y, x) |
gives back atan(y / x). |
cos(x) |
returns the x's cosine. |
hypot(x, y) |
returns sqrt(x*x + y*y),
the Euclidean norm. |
sin(x) |
gives the sine of x back. |
tan(x) |
gives the tangent of x
back. |
degrees(x) |
Angle x is transformed
from radians to degrees. |
radians(x) |
Angle x is transformed
from degrees to radians. |
acosh(x) |
x's inverse hyperbolic
cosine is returned. |
asinh(x) |
x's inverse hyperbolic
sine is returned. |
atanh(x) |
x's inverse hyperbolic
tangent is returned. |
cosh(x) |
gives x's hyperbolic
cosine. |
sinh(x) |
gives x's hyperbolic
cosine. |
tanh(x) |
gives x's hyperbolic
tangent back. |
erf(x) |
the error function at x is
returned. |
erfc(x) |
a function that gives the
complementary error at x |
gamma(x) |
the Gamma function at x is
returned. |
lgamma(x) |
gives the natural
logarithm of the gamma function's absolute value at x. |
pi |
The ratio of a circle's circumference
to its diameter is a mathematical constant (3.14159...) |
e |
e is a constant in
mathematics (2.71828...) |
0 Comments