File: trigonometric.txt

package info (click to toggle)
mpmath 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,348 kB
  • sloc: python: 45,016; makefile: 17; sh: 4
file content (117 lines) | stat: -rw-r--r-- 2,607 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Trigonometric functions
-----------------------

Except where otherwise noted, the trigonometric functions
take a radian angle as input and the inverse trigonometric
functions return radian angles.

The ordinary trigonometric functions are single-valued
functions defined everywhere in the complex plane
(except at the poles of tan, sec, csc, and cot).
They are defined generally via the exponential function,
e.g.

.. math ::

    \cos(x) = \frac{e^{ix} + e^{-ix}}{2}.

The inverse trigonometric functions are multivalued,
thus requiring branch cuts, and are generally real-valued
only on a part of the real line. Definitions and branch cuts
are given in the documentation of each function.
The branch cut conventions used by mpmath are essentially
the same as those found in most standard mathematical software,
such as Mathematica and Python's own ``cmath`` libary (as of Python 2.6;
earlier Python versions implement some functions
erroneously).

Degree-radian conversion
...........................................................

:func:`degrees`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.degrees(x)

:func:`radians`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.radians(x)

Trigonometric functions
.......................

:func:`cos`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.cos(x, **kwargs)

:func:`sin`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.sin(x, **kwargs)

:func:`tan`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.tan(x, **kwargs)

:func:`sec`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.sec(x)

:func:`csc`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.csc(x)

:func:`cot`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.cot(x)

Trigonometric functions with modified argument
........................................................

:func:`cospi`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.cospi(x, **kwargs)

:func:`sinpi`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.sinpi(x, **kwargs)

Inverse trigonometric functions
................................................

:func:`acos`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.acos(x, **kwargs)

:func:`asin`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.asin(x, **kwargs)

:func:`atan`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.atan(x, **kwargs)

:func:`atan2`
^^^^^^^^^^^^^
.. autofunction:: mpmath.atan2(y, x)

:func:`asec`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.asec(x)

:func:`acsc`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.acsc(x)

:func:`acot`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.acot(x)

Sinc function
.............

:func:`sinc`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.sinc(x)

:func:`sincpi`
^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.sincpi(x)