Package org.python.modules
Class cmath
java.lang.Object
org.python.modules.cmath
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PyComplex
Return the arc cosine of w.static PyComplex
Return the hyperbolic arc cosine of w.static PyComplex
Return the arc sine of w.static PyComplex
Return the hyperbolic arc sine of w.static PyComplex
Return the arc tangent of w.static PyComplex
Return the hyperbolic arc tangent of w.static PyComplex
Return the cosine of z.static PyComplex
Return the hyperbolic cosine of z.static PyComplex
Return the exponential value ez.static boolean
static boolean
static PyComplex
Returns the natural logarithm of w.static PyComplex
Returns the logarithm of w to the given base.static PyComplex
Returns the common logarithm of w (base 10 logarithm).static double
static PyTuple
static PyComplex
rect
(double r, double phi) Return the complex number x with polar coordinates r and phi.static PyComplex
Return the sine of z.static PyComplex
Return the hyperbolic sine of z.static PyComplex
Calculate z = x+iy, such that z2 = w.static PyComplex
Return the tangent of z.static PyComplex
Return the hyperbolic tangent of z.
-
Field Details
-
pi
-
e
-
-
Constructor Details
-
cmath
public cmath()
-
-
Method Details
-
acos
Return the arc cosine of w. There are two branch cuts. One extends right from 1 along the real axis to ∞, continuous from below. The other extends left from -1 along the real axis to -∞, continuous from above.- Parameters:
w
-- Returns:
- cos-1w
-
acosh
Return the hyperbolic arc cosine of w. There is one branch cut, extending left from 1 along the real axis to -∞, continuous from above.- Parameters:
w
-- Returns:
- cosh-1w
-
asin
Return the arc sine of w. There are two branch cuts. One extends right from 1 along the real axis to ∞, continuous from below. The other extends left from -1 along the real axis to -∞, continuous from above.- Parameters:
w
-- Returns:
- sin-1w
-
asinh
Return the hyperbolic arc sine of w. There are two branch cuts. One extends from 1j along the imaginary axis to ∞j, continuous from the right. The other extends from -1j along the imaginary axis to -∞j, continuous from the left.- Parameters:
w
-- Returns:
- sinh-1w
-
atan
Return the arc tangent of w. There are two branch cuts. One extends from 1j along the imaginary axis to ∞j, continuous from the right. The other extends from -1j along the imaginary axis to -∞j, continuous from the left.- Parameters:
w
-- Returns:
- tan-1w
-
atanh
Return the hyperbolic arc tangent of w. There are two branch cuts. One extends from 1 along the real axis to ∞, continuous from below. The other extends from -1 along the real axis to -∞, continuous from above.- Parameters:
w
-- Returns:
- tanh-1w
-
cos
Return the cosine of z.- Parameters:
z
-- Returns:
- cos z
-
cosh
Return the hyperbolic cosine of z.- Parameters:
z
-- Returns:
- cosh z
-
exp
Return the exponential value ez.- Parameters:
z
-- Returns:
- ez
-
phase
-
polar
-
rect
Return the complex number x with polar coordinates r and phi. Equivalent tor * (math.cos(phi) + math.sin(phi)*1j)
.- Parameters:
r
- radiusphi
- angle- Returns:
- reiφ
-
isinf
- Parameters:
in
-- Returns:
true
if in.real or in.imag is positive or negative infinity
-
isnan
- Parameters:
in
-- Returns:
true
if in.real or in.imag is nan.
-
log
Returns the natural logarithm of w.- Parameters:
w
-- Returns:
- ln w
-
log10
Returns the common logarithm of w (base 10 logarithm).- Parameters:
w
-- Returns:
- log10w
-
log
Returns the logarithm of w to the given base. If the base is not specified, returns the natural logarithm of w. There is one branch cut, from 0 along the negative real axis to -∞, continuous from above.- Parameters:
w
-b
-- Returns:
- logbw
-
sin
Return the sine of z.- Parameters:
z
-- Returns:
- sin z
-
sinh
Return the hyperbolic sine of z.- Parameters:
z
-- Returns:
- sinh z
-
sqrt
Calculate z = x+iy, such that z2 = w. In taking the square roots to get x and y, we choose to have x≥0 always, and y the same sign as v.- Parameters:
w
- to square-root- Returns:
- w½
-
tan
Return the tangent of z.- Parameters:
z
-- Returns:
- tan z
-
tanh
Return the hyperbolic tangent of z.- Parameters:
z
-- Returns:
- tanh z
-