public class ApcomplexMath extends Object
ApfloatMath
Modifier and Type | Method and Description |
---|---|
static Apfloat |
abs(Apcomplex z)
Absolute value.
|
static Apcomplex |
acos(Apcomplex z)
Inverse cosine.
|
static Apcomplex |
acosh(Apcomplex z)
Inverse hyperbolic cosine.
|
static Apcomplex |
agm(Apcomplex a,
Apcomplex b)
Arithmetic-geometric mean.
|
static Apcomplex[] |
allRoots(Apcomplex z,
int n)
All values of the positive integer root.
|
static Apfloat |
arg(Apcomplex z)
Angle of the complex vector in the complex plane.
|
static Apcomplex |
asin(Apcomplex z)
Inverse sine.
|
static Apcomplex |
asinh(Apcomplex z)
Inverse hyperbolic sine.
|
static Apcomplex |
atan(Apcomplex z)
Inverse tangent.
|
static Apcomplex |
atanh(Apcomplex z)
Inverse hyperbolic tangent.
|
static Apcomplex |
cbrt(Apcomplex z)
Cube root.
|
static Apcomplex |
cos(Apcomplex z)
Cosine.
|
static Apcomplex |
cosh(Apcomplex z)
Hyperbolic cosine.
|
static Apcomplex |
exp(Apcomplex z)
Exponent function.
|
static Apcomplex |
inverseRoot(Apcomplex z,
long n)
Inverse positive integer root.
|
static Apcomplex |
inverseRoot(Apcomplex z,
long n,
long k)
Inverse positive integer root.
|
static Apcomplex |
log(Apcomplex z)
Natural logarithm.
|
static Apcomplex |
log(Apcomplex z,
Apcomplex w)
Logarithm in arbitrary base.
|
static Apcomplex |
negate(Apcomplex z)
Deprecated.
Use
Apcomplex.negate() . |
static Apfloat |
norm(Apcomplex z)
Norm.
|
static Apcomplex |
pow(Apcomplex z,
Apcomplex w)
Arbitrary power.
|
static Apcomplex |
pow(Apcomplex z,
long n)
Integer power.
|
static Apcomplex |
product(Apcomplex... z)
Product of numbers.
|
static Apcomplex |
root(Apcomplex z,
long n)
Positive integer root.
|
static Apcomplex |
root(Apcomplex z,
long n,
long k)
Positive integer root.
|
static Apcomplex |
scale(Apcomplex z,
long scale)
Multiply by a power of the radix.
|
static Apcomplex |
sin(Apcomplex z)
Sine.
|
static Apcomplex |
sinh(Apcomplex z)
Hyperbolic sine.
|
static Apcomplex |
sqrt(Apcomplex z)
Square root.
|
static Apcomplex |
sum(Apcomplex... z)
Sum of numbers.
|
static Apcomplex |
tan(Apcomplex z)
Tangent.
|
static Apcomplex |
tanh(Apcomplex z)
Hyperbolic tangent.
|
static Apcomplex |
w(Apcomplex z)
Lambert W function.
|
static Apcomplex |
w(Apcomplex z,
long k)
Lambert W function for the specified branch.
|
@Deprecated public static Apcomplex negate(Apcomplex z) throws ApfloatRuntimeException
Apcomplex.negate()
.z
- The argument.-z
.ApfloatRuntimeException
public static Apfloat abs(Apcomplex z) throws ApfloatRuntimeException
z
- The argument.sqrt(x2 + y2)
, where z = x + i y
.ApfloatRuntimeException
public static Apfloat norm(Apcomplex z) throws ApfloatRuntimeException
z
- The argument.x2 + y2
, where z = x + i y
.ApfloatRuntimeException
public static Apfloat arg(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
z
- The argument.arctan(y / x)
from the appropriate branch, where z = x + i y
.ArithmeticException
- If z
is zero.ApfloatRuntimeException
public static Apcomplex scale(Apcomplex z, long scale) throws ApfloatRuntimeException
z
- The argument.scale
- The scaling factor.z * z.radix()scale
.ApfloatRuntimeException
public static Apcomplex pow(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException
z
- Base of the power operator.n
- Exponent of the power operator.z
to the n
:th power, that is zn
.ArithmeticException
- If both z
and n
are zero.ApfloatRuntimeException
public static Apcomplex sqrt(Apcomplex z) throws ApfloatRuntimeException
z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex cbrt(Apcomplex z) throws ApfloatRuntimeException
z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex root(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException
z
is always chosen.z
- The argument.n
- Which root to take.n
:th root of z
, that is z1/n
.ArithmeticException
- If n
is zero.ApfloatRuntimeException
public static Apcomplex root(Apcomplex z, long n, long k) throws ArithmeticException, ApfloatRuntimeException
z
is chosen.z
- The argument.n
- Which root to take.k
- Which branch to take.n
:th root of z
, that is z1/nei2πsk/n
where s
is the signum of the imaginary part of z
.ArithmeticException
- If n
is zero.ApfloatRuntimeException
public static Apcomplex inverseRoot(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException
z
is always chosen.z
- The argument.n
- Which inverse root to take.n
:th root of z
, that is z-1/n
.ArithmeticException
- If z
or n
is zero.ApfloatRuntimeException
public static Apcomplex inverseRoot(Apcomplex z, long n, long k) throws ArithmeticException, ApfloatRuntimeException
z
is chosen.z
- The argument.n
- Which inverse root to take.k
- Which branch to take.n
:th root of z
, that is z-1/ne-i2πk/n
.ArithmeticException
- If z
or n
is zero.ApfloatRuntimeException
public static Apcomplex[] allRoots(Apcomplex z, int n) throws ArithmeticException, ApfloatRuntimeException
Returns all of the n
values of the root, in the order
of the angle, starting from the smallest angle and same sign of
imaginary part as z
.
z
- The argument.n
- Which root to take.n
:th root of z
, that is z1/n
, in the order of the angle.ArithmeticException
- If n
is zero.ApfloatRuntimeException
public static Apcomplex agm(Apcomplex a, Apcomplex b) throws ApfloatRuntimeException
a
- First argument.b
- Second argument.a
and b
.ApfloatRuntimeException
public static Apcomplex log(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
The logarithm is calculated using the arithmetic-geometric mean. See the Borweins' book for the formula.
z
- The argument.z
.ArithmeticException
- If z
is zero.ApfloatRuntimeException
public static Apcomplex log(Apcomplex z, Apcomplex w) throws ArithmeticException, ApfloatRuntimeException
z
- The argument.w
- The base.w
logarithm of z
.ArithmeticException
- If z
or w
is zero.ApfloatRuntimeException
public static Apcomplex exp(Apcomplex z) throws ApfloatRuntimeException
z
- The argument.ez
.ApfloatRuntimeException
public static Apcomplex pow(Apcomplex z, Apcomplex w) throws ApfloatRuntimeException
log()
and exp()
.z
- The base.w
- The exponent.zw
.ArithmeticException
- If both z
and w
are zero.ApfloatRuntimeException
public static Apcomplex acos(Apcomplex z) throws ApfloatRuntimeException
log()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex acosh(Apcomplex z) throws ApfloatRuntimeException
log()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex asin(Apcomplex z) throws ApfloatRuntimeException
log()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex asinh(Apcomplex z) throws ApfloatRuntimeException
log()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex atan(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
log()
.z
- The argument.z
.ArithmeticException
- If z == i
.ApfloatRuntimeException
public static Apcomplex atanh(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
log()
.z
- The argument.z
.ArithmeticException
- If z
is 1 or -1.ApfloatRuntimeException
public static Apcomplex cos(Apcomplex z) throws ApfloatRuntimeException
exp()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex cosh(Apcomplex z) throws ApfloatRuntimeException
exp()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex sin(Apcomplex z) throws ApfloatRuntimeException
exp()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex sinh(Apcomplex z) throws ApfloatRuntimeException
exp()
.z
- The argument.z
.ApfloatRuntimeException
public static Apcomplex tan(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
exp()
.z
- The argument.z
.ArithmeticException
- If z
is π/2 + n π where n is an integer.ApfloatRuntimeException
public static Apcomplex tanh(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
exp()
.z
- The argument.z
.ArithmeticException
- If z
is i (π/2 + n π) where n is an integer.ApfloatRuntimeException
public static Apcomplex w(Apcomplex z) throws ApfloatRuntimeException
W eW = z
. Also known as the product logarithm.This function gives the solution to the principal branch, W0.
z
- The argument.W0(z)
.ApfloatRuntimeException
public static Apcomplex w(Apcomplex z, long k) throws ArithmeticException, ApfloatRuntimeException
z
- The argument.k
- The branch.Wk(z)
.ArithmeticException
- If z
is zero and k
is not zero.ApfloatRuntimeException
w(Apcomplex)
public static Apcomplex product(Apcomplex... z) throws ApfloatRuntimeException
If there are no arguments, the return value is 1
.
z
- The argument(s).ApfloatRuntimeException
public static Apcomplex sum(Apcomplex... z) throws ApfloatRuntimeException
If there are no arguments, the return value is 0
.
z
- The argument(s).ApfloatRuntimeException
Copyright © 2017. All rights reserved.