diff options
author | Damien George <damien.p.george@gmail.com> | 2014-10-31 01:37:19 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-10-31 01:37:19 +0000 |
commit | 88d3054ac072f9c73b0f3f045c59ba74f6730c1d (patch) | |
tree | 6db7851068908c0640b1ed306d6823871fd3d742 /docs/library/cmath.rst | |
parent | 7c4445afe104631d5fe8e7401d50f40f205e35b9 (diff) |
docs: Import documentation from source-code inline comments.
The inline docs (prefixed with /// in .c files) have been converted to
RST format and put in the docs subdirectory.
Diffstat (limited to 'docs/library/cmath.rst')
-rw-r--r-- | docs/library/cmath.rst | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/docs/library/cmath.rst b/docs/library/cmath.rst new file mode 100644 index 000000000..d729561d6 --- /dev/null +++ b/docs/library/cmath.rst @@ -0,0 +1,60 @@ +:mod:`cmath` --- mathematical functions for complex numbers +=========================================================== + +.. module:: cmath + :synopsis: mathematical functions for complex numbers + +The ``cmath`` module provides some basic mathematical funtions for +working with complex numbers. + + +Functions +--------- + +.. function:: cos(z) + + Return the cosine of ``z``. + +.. function:: exp(z) + + Return the exponential of ``z``. + +.. function:: log(z) + + Return the natural logarithm of ``z``. The branch cut is along the negative real axis. + +.. function:: log10(z) + + Return the base-10 logarithm of ``z``. The branch cut is along the negative real axis. + +.. function:: phase(z) + + Returns the phase of the number ``z``, in the range (-pi, +pi]. + +.. function:: polar(z) + + Returns, as a tuple, the polar form of ``z``. + +.. function:: rect(r, phi) + + Returns the complex number with modulus ``r`` and phase ``phi``. + +.. function:: sin(z) + + Return the sine of ``z``. + +.. function:: sqrt(z) + + Return the square-root of ``z``. + + +Constants +--------- + +.. data:: e + + base of the natural logarithm + +.. data:: pi + + the ratio of a circle's circumference to its diameter |