Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libcmath.tex @ 15842:f6cd36498a50 legacy-trunk
Document extensions to .pth files.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 13 Jan 2001 09:54:41 +0000 |
| parents | 6613dfd73917 |
| children | d923b3c8b152 |
| rev | line source |
|---|---|
| 8918 | 1 \section{\module{cmath} --- |
|
10645
46788f16650b
Mark the references to module names use \module or \refmodule (the
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
2 Mathematical functions for complex numbers} |
|
46788f16650b
Mark the references to module names use \module or \refmodule (the
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
3 |
|
8716
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
4 \declaremodule{builtin}{cmath} |
|
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
5 \modulesynopsis{Mathematical functions for complex numbers.} |
|
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
6 |
|
10645
46788f16650b
Mark the references to module names use \module or \refmodule (the
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
7 This module is always available. It provides access to mathematical |
|
46788f16650b
Mark the references to module names use \module or \refmodule (the
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
8 functions for complex numbers. The functions are: |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
9 |
|
5809
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 \begin{funcdesc}{acos}{x} |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
11 Return the arc cosine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
12 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
13 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
14 \begin{funcdesc}{acosh}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
15 Return the hyperbolic arc cosine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
16 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
17 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
18 \begin{funcdesc}{asin}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
19 Return the arc sine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
20 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
21 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
22 \begin{funcdesc}{asinh}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
23 Return the hyperbolic arc sine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
24 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
25 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
26 \begin{funcdesc}{atan}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
27 Return the arc tangent of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
28 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
29 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
30 \begin{funcdesc}{atanh}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
31 Return the hyperbolic arc tangent of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
32 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
33 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
34 \begin{funcdesc}{cos}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
35 Return the cosine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
36 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
37 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
38 \begin{funcdesc}{cosh}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
39 Return the hyperbolic cosine of \var{x}. |
|
5809
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
40 \end{funcdesc} |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
41 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
42 \begin{funcdesc}{exp}{x} |
|
7246
193d704cbcc8
Replace $math$ with \code{}.
Guido van Rossum <guido@python.org>
parents:
7049
diff
changeset
|
43 Return the exponential value \code{e**\var{x}}. |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
44 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
45 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
46 \begin{funcdesc}{log}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
47 Return the natural logarithm of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
48 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
49 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
50 \begin{funcdesc}{log10}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
51 Return the base-10 logarithm of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
52 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
53 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
54 \begin{funcdesc}{sin}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
55 Return the sine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
56 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
57 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
58 \begin{funcdesc}{sinh}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
59 Return the hyperbolic sine of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
60 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
61 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
62 \begin{funcdesc}{sqrt}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
63 Return the square root of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
64 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
65 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
66 \begin{funcdesc}{tan}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
67 Return the tangent of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
68 \end{funcdesc} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
69 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
70 \begin{funcdesc}{tanh}{x} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
71 Return the hyperbolic tangent of \var{x}. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
72 \end{funcdesc} |
|
5809
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 |
|
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
74 The module also defines two mathematical constants: |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
75 |
|
5809
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
76 \begin{datadesc}{pi} |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
77 The mathematical constant \emph{pi}, as a real. |
|
5809
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
78 \end{datadesc} |
|
6362
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
79 |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
80 \begin{datadesc}{e} |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
81 The mathematical constant \emph{e}, as a real. |
|
32663267eb40
Fixed up formatting, added descriptions for previously undocumented functions.
Fred Drake <fdrake@acm.org>
parents:
5810
diff
changeset
|
82 \end{datadesc} |
|
5809
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
83 |
|
5120ea86b25d
New cmath module docs, by AMK (with additions and deletions by Guido).
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
84 Note that the selection of functions is similar, but not identical, to |
|
10645
46788f16650b
Mark the references to module names use \module or \refmodule (the
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
85 that in module \refmodule{math}\refbimodindex{math}. The reason for having |
| 11074 | 86 two modules is that some users aren't interested in complex numbers, |
|
7049
aece51362ada
Add index entry for reference to the math module.
Fred Drake <fdrake@acm.org>
parents:
6362
diff
changeset
|
87 and perhaps don't even know what they are. They would rather have |
|
aece51362ada
Add index entry for reference to the math module.
Fred Drake <fdrake@acm.org>
parents:
6362
diff
changeset
|
88 \code{math.sqrt(-1)} raise an exception than return a complex number. |
|
10645
46788f16650b
Mark the references to module names use \module or \refmodule (the
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
89 Also note that the functions defined in \module{cmath} always return a |
|
7049
aece51362ada
Add index entry for reference to the math module.
Fred Drake <fdrake@acm.org>
parents:
6362
diff
changeset
|
90 complex number, even if the answer can be expressed as a real number |
|
aece51362ada
Add index entry for reference to the math module.
Fred Drake <fdrake@acm.org>
parents:
6362
diff
changeset
|
91 (in which case the complex number has an imaginary part of zero). |
