Built-in Module math

math This module is always available. It provides access to the mathematical functions defined by the C standard. They are:
\begin{funcdesc}{acos}{x}
\funcline{asin}{x}
\funcline{atan}{x}
\funcline{atan2}...
...{sinh}{x}
\funcline{sqrt}{x}
\funcline{tan}{x}
\funcline{tanh}{x}
\end{funcdesc}
acos(x), asin(x), atan(x), atan2(x  y), ceil(x), cos(x), cosh(x), exp(x), fabs(x), floor(x), fmod(x  y), frexp(x), ldexp(x  y), log(x), log10(x), modf(x), pow(x  y), sin(x), sinh(x), sqrt(x), tan(x), tanh(x).

Note that frexp and modf have a different call/return pattern than their C equivalents: they take a single argument and return a pair of values, rather than returning their second return value through an `output parameter' (there is no such thing in Python).

The module also defines two mathematical constants:
\begin{datadesc}{pi}
\dataline{e}
\end{datadesc}
pi and e.