public class FixedPrecisionApcomplexHelper extends Object
All results of the mathematical operations are set to have the specified precision.
Also all input arguments are set to the specified precision before the operation.
If the specified precision is not infinite, this helper class also avoids
InfiniteExpansionException e.g. in case where it would happen with
ApcomplexMath.acos(Apcomplex.ZERO).
| Constructor and Description |
|---|
FixedPrecisionApcomplexHelper(long precision)
Constructs an apcomplex fixed-precison helper with the specified precision.
|
| Modifier and Type | Method and Description |
|---|---|
Apfloat |
abs(Apcomplex z)
Absolute value.
|
Apcomplex |
acos(Apcomplex z)
Arc cosine.
|
Apcomplex |
acosh(Apcomplex z)
Hyperbolic arc cosine.
|
Apcomplex |
add(Apcomplex z,
Apcomplex w)
Addition.
|
Apcomplex |
agm(Apcomplex a,
Apcomplex b)
Arithmetic-geometric mean.
|
Apcomplex[] |
allRoots(Apcomplex z,
int n)
All branches of a root.
|
Apfloat |
arg(Apcomplex z)
Complex angle.
|
Apcomplex |
asin(Apcomplex z)
Arc sine.
|
Apcomplex |
asinh(Apcomplex z)
Hyperbolic arc sine.
|
Apcomplex |
atan(Apcomplex z)
Arc tangent.
|
Apcomplex |
atanh(Apcomplex z)
Hyperbolic arc tangent.
|
Apcomplex |
cbrt(Apcomplex z)
Cube root.
|
Apcomplex |
conj(Apcomplex z)
Complex conjugate.
|
Apcomplex |
cos(Apcomplex z)
Cosine.
|
Apcomplex |
cosh(Apcomplex z)
Hyperbolic cosine.
|
Apcomplex |
divide(Apcomplex z,
Apcomplex w)
Division.
|
Apcomplex |
exp(Apcomplex z)
Exponential function.
|
Apfloat |
imag(Apcomplex z)
Imaginary part.
|
Apcomplex |
inverseRoot(Apcomplex z,
long n)
Inverse root.
|
Apcomplex |
inverseRoot(Apcomplex z,
long n,
long k)
Inverse root with branch.
|
Apcomplex |
log(Apcomplex z)
Natural logarithm.
|
Apcomplex |
log(Apcomplex z,
Apcomplex w)
Logarithm in specified base.
|
Apcomplex |
multiply(Apcomplex z,
Apcomplex w)
Multiplication.
|
Apcomplex |
negate(Apcomplex z)
Negation.
|
Apfloat |
norm(Apcomplex z)
Norm.
|
Apcomplex |
pow(Apcomplex z,
Apcomplex w)
Power.
|
Apcomplex |
pow(Apcomplex z,
long n)
Integer power.
|
long |
precision()
Returns the precision, which is used for the results.
|
Apcomplex |
product(Apcomplex... z)
Product.
|
Apfloat |
real(Apcomplex z)
Real part.
|
Apcomplex |
root(Apcomplex z,
long n)
Root.
|
Apcomplex |
root(Apcomplex z,
long n,
long k)
Root with branch.
|
Apcomplex |
scale(Apcomplex z,
long scale)
Move the radix point.
|
Apcomplex |
sin(Apcomplex z)
Sine.
|
Apcomplex |
sinh(Apcomplex z)
Hyperbolic sine.
|
Apcomplex |
sqrt(Apcomplex z)
Square root.
|
Apcomplex |
subtract(Apcomplex z,
Apcomplex w)
Subtraction.
|
Apcomplex |
sum(Apcomplex... z)
Sum.
|
Apcomplex |
tan(Apcomplex z)
Tangent.
|
Apcomplex |
tanh(Apcomplex z)
Hyperbolic tangent.
|
Apcomplex |
valueOf(Apcomplex z)
Returns the value with the specified precision.
|
Apcomplex |
w(Apcomplex z)
Lambert W function.
|
Apcomplex |
w(Apcomplex z,
long k)
Lambert W function for the specified branch.
|
public FixedPrecisionApcomplexHelper(long precision)
throws IllegalArgumentException
precision - The precision of the results.IllegalArgumentException - In case the precision is invalid.public Apcomplex valueOf(Apcomplex z) throws ApfloatRuntimeException
z - The value.ApfloatRuntimeExceptionpublic Apcomplex negate(Apcomplex z) throws ApfloatRuntimeException
z - The value to negate.-z.ApfloatRuntimeExceptionpublic Apcomplex conj(Apcomplex z) throws ApfloatRuntimeException
z - The operand.x - i y where z is x + i y.ApfloatRuntimeExceptionpublic Apcomplex add(Apcomplex z, Apcomplex w) throws ApfloatRuntimeException
z - The first operand.w - The second operand.z + w.ApfloatRuntimeExceptionpublic Apcomplex subtract(Apcomplex z, Apcomplex w) throws ApfloatRuntimeException
z - The first operand.w - The second operand.z - w.ApfloatRuntimeExceptionpublic Apcomplex multiply(Apcomplex z, Apcomplex w) throws ApfloatRuntimeException
z - The first operand.w - The second operand.z * w.ApfloatRuntimeExceptionpublic Apcomplex divide(Apcomplex z, Apcomplex w) throws ArithmeticException, ApfloatRuntimeException
z - The first operand.w - The second operand.z / w.ArithmeticException - If w is zero.ApfloatRuntimeExceptionpublic Apcomplex pow(Apcomplex z, Apcomplex w) throws ArithmeticException, ApfloatRuntimeException
z - The first operand.w - The second operand.zw.ArithmeticException - If z and w are zero.ApfloatRuntimeExceptionpublic Apcomplex pow(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException
z - The first operand.n - The first operand.zn.ArithmeticException - If z and n are zero, or z is zero and n is negative.ApfloatRuntimeExceptionpublic Apfloat arg(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
z - The operand.z on the complex plane.ArithmeticException - If z is zero.ApfloatRuntimeExceptionpublic Apfloat imag(Apcomplex z)
z - The operand.z.public Apfloat real(Apcomplex z)
z - The operand.z.public Apfloat abs(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apfloat norm(Apcomplex z) throws ApfloatRuntimeException
z - The operand.x2 + y2 where z is x + i y.ApfloatRuntimeExceptionpublic Apcomplex acos(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex acosh(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex asin(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex asinh(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex atan(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ArithmeticException - If z is i.ApfloatRuntimeExceptionpublic Apcomplex atanh(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
z - The operand.z.ArithmeticException - If z is 1 or -1.ApfloatRuntimeExceptionpublic Apcomplex cbrt(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex cos(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex cosh(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex exp(Apcomplex z) throws ApfloatRuntimeException
z - The operand.ez.ApfloatRuntimeExceptionpublic Apcomplex log(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
z - The operand.z.ArithmeticException - If z is zero.ApfloatRuntimeExceptionpublic Apcomplex log(Apcomplex z, Apcomplex w) throws ArithmeticException, ApfloatRuntimeException
z - The operand.w - The base.w logarithm of z.ArithmeticException - If z or w is zero.ApfloatRuntimeExceptionpublic Apcomplex sin(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex sinh(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex sqrt(Apcomplex z) throws ApfloatRuntimeException
z - The operand.z.ApfloatRuntimeExceptionpublic Apcomplex tan(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
z - The operand.z.ArithmeticException - If z is π/2 + n π where n is an integer.ApfloatRuntimeExceptionpublic Apcomplex tanh(Apcomplex z) throws ArithmeticException, ApfloatRuntimeException
z - The operand.z.ArithmeticException - If z is i (π/2 + n π) where n is an integer.ApfloatRuntimeExceptionpublic Apcomplex agm(Apcomplex a, Apcomplex b) throws ApfloatRuntimeException
a - The first operand.b - The first operand.a and b.ApfloatRuntimeExceptionpublic Apcomplex inverseRoot(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException
z - The operand.n - Which inverse root to take.z-1/n.ArithmeticException - If z or n is zero.ApfloatRuntimeExceptionpublic Apcomplex inverseRoot(Apcomplex z, long n, long k) throws ArithmeticException, ApfloatRuntimeException
z - The operand.n - Which inverse root to take.k - Which branch to take.z-1/ne-i2πk/n.ArithmeticException - If z or n is zero.ApfloatRuntimeExceptionpublic Apcomplex root(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException
z - The operand.n - Which root to take.z1/n.ArithmeticException - If n is zero, or z is zero and n is negative.ApfloatRuntimeExceptionpublic Apcomplex root(Apcomplex z, long n, long k) throws ArithmeticException, ApfloatRuntimeException
z - The operand.n - Which root to take.k - Which branch to take.z1/nei2πsk/n where s is the signum of the imaginary part of z.ArithmeticException - If n is zero, or z is zero and n is negative.ApfloatRuntimeExceptionpublic Apcomplex[] allRoots(Apcomplex z, int n) throws ArithmeticException, ApfloatRuntimeException
z - The operand.n - Which root to take.z1/n.ArithmeticException - If n is zero, or z is zero and n is negative.ApfloatRuntimeExceptionpublic Apcomplex scale(Apcomplex z, long scale) throws ApfloatRuntimeException
z - The operand.scale - The amount to move the radix point.z * z.radix()scale.ApfloatRuntimeExceptionpublic Apcomplex w(Apcomplex z) throws ApfloatRuntimeException
z - The operand.W0(z).ApfloatRuntimeExceptionpublic Apcomplex w(Apcomplex z, long k) throws ApfloatRuntimeException
z - The operand.k - The branch.Wk(z).ApfloatRuntimeExceptionpublic Apcomplex product(Apcomplex... z) throws ApfloatRuntimeException
z - The operand(s).ApfloatRuntimeExceptionpublic Apcomplex sum(Apcomplex... z) throws ApfloatRuntimeException
z - The operand(s).ApfloatRuntimeExceptionpublic long precision()
Copyright © 2024. All rights reserved.