diff options
author | Guido van Rossum <guido@python.org> | 1994-01-02 01:22:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-01-02 01:22:07 (GMT) |
commit | 5fdeeeae2a12b9956cc84d62eae82f72cabc8664 (patch) | |
tree | ac0053479e10099850c8e0d06e31cb3afbf632bb /Doc/libmath.tex | |
parent | 0b0719866e8a32d0a787e73bca9e79df1d1a74f8 (diff) | |
download | cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.zip cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.tar.gz cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.tar.bz2 |
Restructured library documentation
Diffstat (limited to 'Doc/libmath.tex')
-rw-r--r-- | Doc/libmath.tex | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Doc/libmath.tex b/Doc/libmath.tex new file mode 100644 index 0000000..62da689 --- /dev/null +++ b/Doc/libmath.tex @@ -0,0 +1,70 @@ +\section{Built-in Module \sectcode{math}} + +\bimodindex{math} +\renewcommand{\indexsubitem}{(in module math)} +This module is always available. +It provides access to the mathematical functions defined by the C +standard. +They are: +\iftexi +\begin{funcdesc}{acos}{x} +\funcline{asin}{x} +\funcline{atan}{x} +\funcline{atan2}{x, y} +\funcline{ceil}{x} +\funcline{cos}{x} +\funcline{cosh}{x} +\funcline{exp}{x} +\funcline{fabs}{x} +\funcline{floor}{x} +\funcline{fmod}{x, y} +\funcline{frexp}{x} +\funcline{ldexp}{x, y} +\funcline{log}{x} +\funcline{log10}{x} +\funcline{modf}{x} +\funcline{pow}{x, y} +\funcline{sin}{x} +\funcline{sinh}{x} +\funcline{sqrt}{x} +\funcline{tan}{x} +\funcline{tanh}{x} +\end{funcdesc} +\else +\code{acos(\varvars{x})}, +\code{asin(\varvars{x})}, +\code{atan(\varvars{x})}, +\code{atan2(\varvars{x\, y})}, +\code{ceil(\varvars{x})}, +\code{cos(\varvars{x})}, +\code{cosh(\varvars{x})}, +\code{exp(\varvars{x})}, +\code{fabs(\varvars{x})}, +\code{floor(\varvars{x})}, +\code{fmod(\varvars{x\, y})}, +\code{frexp(\varvars{x})}, +\code{ldexp(\varvars{x\, y})}, +\code{log(\varvars{x})}, +\code{log10(\varvars{x})}, +\code{modf(\varvars{x})}, +\code{pow(\varvars{x\, y})}, +\code{sin(\varvars{x})}, +\code{sinh(\varvars{x})}, +\code{sqrt(\varvars{x})}, +\code{tan(\varvars{x})}, +\code{tanh(\varvars{x})}. +\fi + +Note that \code{frexp} and \code{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: +\iftexi +\begin{datadesc}{pi} +\dataline{e} +\end{datadesc} +\else +\code{pi} and \code{e}. +\fi |