GNU Info

Info Node: (python2.1-lib.info)cmath

(python2.1-lib.info)cmath


Next: random Prev: math Up: Miscellaneous Services
Enter node , (file) or (file)node

Mathematical functions for complex numbers
==========================================

Mathematical functions for complex numbers.

This module is always available.  It provides access to mathematical
functions for complex numbers.  The functions are:

`acos(x)'
     Return the arc cosine of X.

`acosh(x)'
     Return the hyperbolic arc cosine of X.

`asin(x)'
     Return the arc sine of X.

`asinh(x)'
     Return the hyperbolic arc sine of X.

`atan(x)'
     Return the arc tangent of X.

`atanh(x)'
     Return the hyperbolic arc tangent of X.

`cos(x)'
     Return the cosine of X.

`cosh(x)'
     Return the hyperbolic cosine of X.

`exp(x)'
     Return the exponential value `e**X'.

`log(x)'
     Return the natural logarithm of X.

`log10(x)'
     Return the base-10 logarithm of X.

`sin(x)'
     Return the sine of X.

`sinh(x)'
     Return the hyperbolic sine of X.

`sqrt(x)'
     Return the square root of X.

`tan(x)'
     Return the tangent of X.

`tanh(x)'
     Return the hyperbolic tangent of X.

The module also defines two mathematical constants:

`pi'
     The mathematical constant _pi_, as a real.

`e'
     The mathematical constant _e_, as a real.

Note that the selection of functions is similar, but not identical, to
that in module `math' .  The reason for having two modules is that some
users aren't interested in complex numbers, and perhaps don't even know
what they are.  They would rather have `math.sqrt(-1)' raise an
exception than return a complex number.  Also note that the functions
defined in `cmath' always return a complex number, even if the answer
can be expressed as a real number (in which case the complex number has
an imaginary part of zero).


automatically generated by info2www version 1.2.2.9