Package org.apfloat
Class FixedPrecisionApcomplexHelper
java.lang.Object
org.apfloat.FixedPrecisionApcomplexHelper
- Direct Known Subclasses:
FixedPrecisionApfloatHelper
Fixed-precision mathematical functions for complex numbers.
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)
.
- Since:
- 1.5
- Version:
- 1.14.0
- Author:
- Mikko Tommila
-
Constructor Summary
ConstructorDescriptionFixedPrecisionApcomplexHelper
(long precision) Constructs an apcomplex fixed-precison helper with the specified precision. -
Method Summary
Modifier and TypeMethodDescriptionAbsolute value.Arc cosine.Hyperbolic arc cosine.Addition.Arithmetic-geometric mean.Airy function Ai.Derivative of the Airy function Ai.Airy function Bi.Derivative of the Airy function Bi.All branches of a root.Complex angle.Arc sine.Hyperbolic arc sine.Arc tangent.Hyperbolic arc tangent.bernoulli
(long n) Bernoulli number.bernoulli
(long n, int radix) Bernoulli number.bernoulliB
(long n, Apcomplex z) Bernoulli polynomial.Modified Bessel function of the first kind.Bessel function of the first kind.Modified Bessel function of the second kind.Bessel function of the second kind.Beta function.Incomplete beta function.Generalized incomplete beta function.binomial
(long n, long k) Binomial coefficient.binomial
(long n, long k, int radix) Binomial coefficient.Binomial coefficient.catalan()
Catalan's constant G.catalan
(int radix) Catalan's constant G.Cube root.chebyshevT
(Apcomplex ν, Apcomplex z) Chebyshev function of the first kind.chebyshevU
(Apcomplex ν, Apcomplex z) Chebyshev function of the second kind.Complex conjugate.Cosine.Hyperbolic cosine.Hyperbolic cosine integral.Cosine integral.Digamma function.Division.e()
e.e
(int radix) e.Complete elliptic integral of the second kind.Complete elliptic integral of the first kind.Error function.Complementary error function.Imaginary error function.euler()
γ, the Euler-Mascheroni constant.euler
(int radix) γ, the Euler-Mascheroni constant.Euler polynomial.Exponential function.expIntegralE
(Apcomplex ν, Apcomplex z) Exponential integral E.Exponential integral Ei.Fibonacci function.Fresnel integral C.Fresnel integral S.Gamma function.Incomplete gamma function.Generalized incomplete gamma function.gegenbauerC
(Apcomplex ν, Apcomplex z) Renormalized Gegenbauer function.gegenbauerC
(Apcomplex ν, Apcomplex λ, Apcomplex z) Gegenbauer function.glaisher()
The Glaisher-Kinkelin constant A.glaisher
(int radix) The Glaisher-Kinkelin constant A.Harmonic number.harmonicNumber
(Apcomplex z, Apcomplex r) Generalized harmonic number.Hermite function.Confluent hypergeometric function 0F1.Regularized confluent hypergeometric function 0F̃1.hypergeometric1F1
(Apcomplex a, Apcomplex b, Apcomplex z) Kummer confluent hypergeometric function 1F1.Regularized Kummer confluent hypergeometric function 1F̃1.hypergeometric2F1
(Apcomplex a, Apcomplex b, Apcomplex c, Apcomplex z) Hypergeometric function 2F1.hypergeometric2F1Regularized
(Apcomplex a, Apcomplex b, Apcomplex c, Apcomplex z) Regularized hypergeometric function 2F̃1.hypergeometricU
(Apcomplex a, Apcomplex b, Apcomplex z) Tricomi's confluent hypergeometric function U.Imaginary part.inverseRoot
(Apcomplex z, long n) Inverse root.inverseRoot
(Apcomplex z, long n, long k) Inverse root with branch.Jacobi function.khinchin()
Khinchin's constant K.khinchin
(int radix) Khinchin's constant K.Laguerre function.Generalized Laguerre function.Legendre function.Associated Legendre function of the first kind.Legendre function of the second kind.Associated Legendre function of the second kind.Natural logarithm.Logarithm in specified base.Logarithm of the gamma function.Logarithmic integral.Logistic sigmoid.Multiplication.Negation.Norm.pochhammer
(Apcomplex z, Apcomplex n) Pochhammer symbol.Polygamma function.Polylogarithm.Integer power.Power.long
Returns the precision, which is used for the results.Product.Real part.Root.Root with branch.Move the radix point.Sine.Sinc.Hyperbolic sine.Hyperbolic sine integral.Sine integral.sphericalHarmonicY
(Apcomplex λ, Apcomplex μ, Apcomplex ϑ, Apcomplex ϕ) Spherical harmonic function.Square root.Subtraction.Sum.Tangent.Hyperbolic tangent.Unit in the last place.Returns the value with the specified precision.Lambert W function.Lambert W function for the specified branch.Riemann zeta function.Hurwitz zeta function.
-
Constructor Details
-
FixedPrecisionApcomplexHelper
Constructs an apcomplex fixed-precison helper with the specified precision. The results of all mathematical operations are set to the specified precision.- Parameters:
precision
- The precision of the results.- Throws:
IllegalArgumentException
- In case the precision is invalid.
-
-
Method Details
-
valueOf
Returns the value with the specified precision.- Parameters:
z
- The value.- Returns:
- The value with to the specified precision.
- Throws:
ApfloatRuntimeException
-
negate
Negation.- Parameters:
z
- The value to negate.- Returns:
-z
.- Throws:
ApfloatRuntimeException
-
conj
Complex conjugate.- Parameters:
z
- The operand.- Returns:
x - i y
wherez
isx + i y
.- Throws:
ApfloatRuntimeException
-
add
Addition.- Parameters:
z
- The first operand.w
- The second operand.- Returns:
z + w
.- Throws:
ApfloatRuntimeException
-
subtract
Subtraction.- Parameters:
z
- The first operand.w
- The second operand.- Returns:
z - w
.- Throws:
ApfloatRuntimeException
-
multiply
Multiplication.- Parameters:
z
- The first operand.w
- The second operand.- Returns:
z * w
.- Throws:
ApfloatRuntimeException
-
divide
public Apcomplex divide(Apcomplex z, Apcomplex w) throws ArithmeticException, ApfloatRuntimeException Division.- Parameters:
z
- The first operand.w
- The second operand.- Returns:
z / w
.- Throws:
ArithmeticException
- Ifw
is zero.ApfloatRuntimeException
-
pow
Power.- Parameters:
z
- The first operand.w
- The second operand.- Returns:
zw
.- Throws:
ArithmeticException
- Ifz
andw
are zero.ApfloatRuntimeException
-
pow
Integer power.- Parameters:
z
- The first operand.n
- The first operand.- Returns:
zn
.- Throws:
ArithmeticException
- Ifz
andn
are zero, orz
is zero andn
is negative.ApfloatRuntimeException
-
arg
Complex angle.- Parameters:
z
- The operand.- Returns:
- The angle of
z
on the complex plane. - Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
-
imag
-
real
-
abs
Absolute value.- Parameters:
z
- The operand.- Returns:
- The absolute value of
z
. - Throws:
ApfloatRuntimeException
-
norm
Norm.- Parameters:
z
- The operand.- Returns:
x2 + y2
wherez
isx + i y
.- Throws:
ApfloatRuntimeException
-
acos
Arc cosine.- Parameters:
z
- The operand.- Returns:
- The arc cosine of
z
. - Throws:
ApfloatRuntimeException
-
acosh
Hyperbolic arc cosine.- Parameters:
z
- The operand.- Returns:
- The hyperbolic arc cosine of
z
. - Throws:
ApfloatRuntimeException
-
asin
Arc sine.- Parameters:
z
- The operand.- Returns:
- The arc sine of
z
. - Throws:
ApfloatRuntimeException
-
asinh
Hyperbolic arc sine.- Parameters:
z
- The operand.- Returns:
- The hyperbolic arc sine of
z
. - Throws:
ApfloatRuntimeException
-
atan
Arc tangent.- Parameters:
z
- The operand.- Returns:
- The arc tangent of
z
. - Throws:
ArithmeticException
- Ifz
isi
.ApfloatRuntimeException
-
atanh
Hyperbolic arc tangent.- Parameters:
z
- The operand.- Returns:
- The hyperbolic arc tangent of
z
. - Throws:
ArithmeticException
- Ifz
is 1 or -1.ApfloatRuntimeException
-
cbrt
Cube root.- Parameters:
z
- The operand.- Returns:
- The cube root of
z
. - Throws:
ApfloatRuntimeException
-
cos
Cosine.- Parameters:
z
- The operand.- Returns:
- The cosine of
z
. - Throws:
ApfloatRuntimeException
-
cosh
Hyperbolic cosine.- Parameters:
z
- The operand.- Returns:
- The hyperbolic cosine of
z
. - Throws:
ApfloatRuntimeException
-
exp
Exponential function.- Parameters:
z
- The operand.- Returns:
ez
.- Throws:
ApfloatRuntimeException
-
log
Natural logarithm.- Parameters:
z
- The operand.- Returns:
- The natural logarithm of
z
. - Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
-
log
Logarithm in specified base.- Parameters:
z
- The operand.w
- The base.- Returns:
- The base-
w
logarithm ofz
. - Throws:
ArithmeticException
- Ifz
orw
is zero.ApfloatRuntimeException
- Since:
- 1.6
-
sin
Sine.- Parameters:
z
- The operand.- Returns:
- The sine of
z
. - Throws:
ApfloatRuntimeException
-
sinh
Hyperbolic sine.- Parameters:
z
- The operand.- Returns:
- The hyperbolic sine of
z
. - Throws:
ApfloatRuntimeException
-
sqrt
Square root.- Parameters:
z
- The operand.- Returns:
- The square root of
z
. - Throws:
ApfloatRuntimeException
-
tan
Tangent.- Parameters:
z
- The operand.- Returns:
- The tangent of
z
. - Throws:
ArithmeticException
- Ifz
is π/2 + n π where n is an integer.ApfloatRuntimeException
-
tanh
Hyperbolic tangent.- Parameters:
z
- The operand.- Returns:
- The hyperbolic tangent of
z
. - Throws:
ArithmeticException
- Ifz
is i (π/2 + n π) where n is an integer.ApfloatRuntimeException
-
sinc
Sinc.- Parameters:
z
- The argument.- Returns:
- sinc(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.14.0
-
agm
Arithmetic-geometric mean.- Parameters:
a
- The first operand.b
- The first operand.- Returns:
- The arithmetic-geometric mean of
a
andb
. - Throws:
ApfloatRuntimeException
-
inverseRoot
public Apcomplex inverseRoot(Apcomplex z, long n) throws ArithmeticException, ApfloatRuntimeException Inverse root.- Parameters:
z
- The operand.n
- Which inverse root to take.- Returns:
z-1/n
.- Throws:
ArithmeticException
- Ifz
orn
is zero.ApfloatRuntimeException
-
inverseRoot
public Apcomplex inverseRoot(Apcomplex z, long n, long k) throws ArithmeticException, ApfloatRuntimeException Inverse root with branch.- Parameters:
z
- The operand.n
- Which inverse root to take.k
- Which branch to take.- Returns:
z-1/ne-i2πk/n
.- Throws:
ArithmeticException
- Ifz
orn
is zero.ApfloatRuntimeException
-
root
Root.- Parameters:
z
- The operand.n
- Which root to take.- Returns:
z1/n
.- Throws:
ArithmeticException
- Ifn
is zero, orz
is zero andn
is negative.ApfloatRuntimeException
-
root
public Apcomplex root(Apcomplex z, long n, long k) throws ArithmeticException, ApfloatRuntimeException Root with branch.- Parameters:
z
- The operand.n
- Which root to take.k
- Which branch to take.- Returns:
z1/nei2πsk/n
wheres
is the signum of the imaginary part ofz
.- Throws:
ArithmeticException
- Ifn
is zero, orz
is zero andn
is negative.ApfloatRuntimeException
-
allRoots
All branches of a root.- Parameters:
z
- The operand.n
- Which root to take.- Returns:
z1/n
.- Throws:
ArithmeticException
- Ifn
is zero, orz
is zero andn
is negative.ApfloatRuntimeException
-
scale
Move the radix point.- Parameters:
z
- The operand.scale
- The amount to move the radix point.- Returns:
z * z.radix()scale
.- Throws:
ApfloatRuntimeException
-
w
Lambert W function.- Parameters:
z
- The operand.- Returns:
W0(z)
.- Throws:
ApfloatRuntimeException
- Since:
- 1.8.0
-
w
Lambert W function for the specified branch.- Parameters:
z
- The operand.k
- The branch.- Returns:
Wk(z)
.- Throws:
ApfloatRuntimeException
- Since:
- 1.8.0
-
product
Product.- Parameters:
z
- The operand(s).- Returns:
- The product of the operands.
- Throws:
ApfloatRuntimeException
-
sum
Sum.- Parameters:
z
- The operand(s).- Returns:
- The sum of the operands.
- Throws:
ApfloatRuntimeException
-
e
e.- Returns:
- e.
- Throws:
ApfloatRuntimeException
- Since:
- 1.11.0
-
e
e.- Parameters:
radix
- The radix of the result.- Returns:
- e.
- Throws:
NumberFormatException
- If the radix is invalid.ApfloatRuntimeException
- Since:
- 1.11.0
-
euler
γ, the Euler-Mascheroni constant.- Returns:
γ
.- Throws:
ApfloatRuntimeException
- Since:
- 1.11.0
-
euler
γ, the Euler-Mascheroni constant.- Parameters:
radix
- The radix of the result.- Returns:
γ
.- Throws:
NumberFormatException
- If the radix is invalid.ApfloatRuntimeException
- Since:
- 1.11.0
-
catalan
Catalan's constant G.- Returns:
- G.
- Throws:
ApfloatRuntimeException
- Since:
- 1.11.0
-
catalan
Catalan's constant G.- Parameters:
radix
- The radix of the result.- Returns:
- G.
- Throws:
NumberFormatException
- If the radix is invalid.ApfloatRuntimeException
- Since:
- 1.11.0
-
glaisher
The Glaisher-Kinkelin constant A.- Returns:
- A.
- Throws:
ApfloatRuntimeException
- Since:
- 1.11.0
-
glaisher
The Glaisher-Kinkelin constant A.- Parameters:
radix
- The radix of the result.- Returns:
- A.
- Throws:
NumberFormatException
- If the radix is invalid.ApfloatRuntimeException
- Since:
- 1.11.0
-
khinchin
Khinchin's constant K.- Returns:
- K.
- Throws:
ApfloatRuntimeException
- Since:
- 1.11.0
-
khinchin
Khinchin's constant K.- Parameters:
radix
- The radix of the result.- Returns:
- K.
- Throws:
NumberFormatException
- If the radix is invalid.ApfloatRuntimeException
- Since:
- 1.11.0
-
gamma
Gamma function.- Parameters:
z
- The operand.- Returns:
Γ(z)
.- Throws:
ArithmeticException
- Ifz
is a nonpositive integer.ApfloatRuntimeException
- Since:
- 1.9.0
-
gamma
public Apcomplex gamma(Apcomplex a, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Incomplete gamma function.- Parameters:
a
- The first operand.z
- The second operand.- Returns:
Γ(a, z)
.- Throws:
ArithmeticException
- Ifa
is a nonpositive integer andz
is zero.ApfloatRuntimeException
- Since:
- 1.10.0
-
gamma
public Apcomplex gamma(Apcomplex a, Apcomplex z0, Apcomplex z1) throws ArithmeticException, ApfloatRuntimeException Generalized incomplete gamma function.- Parameters:
a
- The first operand.z0
- The second operand.z1
- The third operand.- Returns:
Γ(a, z0)
-Γ(a, z1)
.- Throws:
ArithmeticException
- Ifa
is a nonpositive integer and eitherz0
orz1
is zero.ApfloatRuntimeException
- Since:
- 1.10.0
-
logGamma
Logarithm of the gamma function.- Parameters:
z
- The argument.- Returns:
logΓ(z)
- Throws:
ArithmeticException
- Ifz
is a nonpositive integer.ApfloatRuntimeException
- Since:
- 1.11.0
-
digamma
Digamma function.- Parameters:
z
- The argument.- Returns:
ψ(z)
- Throws:
ArithmeticException
- Ifz
is a nonpositive integer.ApfloatRuntimeException
- Since:
- 1.11.0
-
polygamma
Polygamma function.- Parameters:
n
- The order.z
- The argument.- Returns:
ψ(n)(z)
- Throws:
ArithmeticException
- Ifn
is negative orz
is a nonpositive integer.ApfloatRuntimeException
- Since:
- 1.13.0
-
beta
Beta function.- Parameters:
a
- The first argument.b
- The second argument.- Returns:
- B(a, b)
- Throws:
ArithmeticException
- Ifa
orb
is a nonpositive integer buta + b
is not. Also if botha
andb
are nonpositive integers.ApfloatRuntimeException
- Since:
- 1.13.0
-
beta
public Apcomplex beta(Apcomplex z, Apcomplex a, Apcomplex b) throws ArithmeticException, ApfloatRuntimeException Incomplete beta function.- Parameters:
z
- The first argument.a
- The second argument.b
- The third argument.- Returns:
- Bz(a, b)
- Throws:
ArithmeticException
- Ifa
is a nonpositive integer orz
is zero anda
has nonpositive real part.ApfloatRuntimeException
- Since:
- 1.13.0
-
beta
public Apcomplex beta(Apcomplex z1, Apcomplex z2, Apcomplex a, Apcomplex b) throws ArithmeticException, ApfloatRuntimeException Generalized incomplete beta function.- Parameters:
z1
- The first argument.z2
- The second argument.a
- The third argument.b
- The fourth argument.- Returns:
- B(z1, z2)(a, b)
- Throws:
ArithmeticException
- Ifa
is a nonpositive integer orz1
orz2
is zero anda
has nonpositive real part.ApfloatRuntimeException
- Since:
- 1.13.0
-
pochhammer
public Apcomplex pochhammer(Apcomplex z, Apcomplex n) throws ArithmeticException, ApfloatRuntimeException Pochhammer symbol.- Parameters:
z
- The first argument.n
- The second argument.- Returns:
(z)n
- Throws:
ArithmeticException
- Ifz + n
is a nonpositive integer butz
is not.ApfloatRuntimeException
- Since:
- 1.13.0
-
binomial
Binomial coefficient.- Parameters:
n
- The argument.k
- The argument.- Returns:
- The binomial coefficient.
- Throws:
ArithmeticException
- Ifn
ork
is negative.ApfloatRuntimeException
- Since:
- 1.11.0
-
binomial
public Apfloat binomial(long n, long k, int radix) throws ArithmeticException, NumberFormatException, ApfloatRuntimeException Binomial coefficient.- Parameters:
n
- The argument.k
- The argument.radix
- The radix.- Returns:
- The binomial coefficient.
- Throws:
ArithmeticException
- Ifn
ork
is negative.NumberFormatException
- If the radix is not valid.ApfloatRuntimeException
- Since:
- 1.11.0
-
binomial
public Apcomplex binomial(Apcomplex n, Apcomplex k) throws ArithmeticException, ApfloatRuntimeException Binomial coefficient.- Parameters:
n
- The argument.k
- The argument.- Returns:
- The binomial coefficient.
- Throws:
ArithmeticException
- Ifn
,k
orn - k
is a nonpositive integer.ApfloatRuntimeException
- Since:
- 1.11.0
-
bernoulli
Bernoulli number.- Parameters:
n
- The argument.- Returns:
Bn
- Throws:
IllegalArgumentException
- Ifn < 0
.ApfloatRuntimeException
- Since:
- 1.11.0
-
bernoulli
public Apfloat bernoulli(long n, int radix) throws IllegalArgumentException, NumberFormatException, ApfloatRuntimeException Bernoulli number.- Parameters:
n
- The argument.radix
- The radix.- Returns:
Bn
- Throws:
IllegalArgumentException
- Ifn < 0
.NumberFormatException
- If the radix is not valid.ApfloatRuntimeException
- Since:
- 1.11.0
-
zeta
Riemann zeta function.- Parameters:
s
- The argument.- Returns:
ζ(s)
- Throws:
ArithmeticException
- Ifs
is1
.ApfloatRuntimeException
- Since:
- 1.11.0
-
zeta
Hurwitz zeta function.- Parameters:
s
- The first argument.a
- The second argument.- Returns:
ζ(s, a)
- Throws:
ArithmeticException
- Ifs
is1
or ifa
is a nonpositive integer.ApfloatRuntimeException
- Since:
- 1.11.0
-
hypergeometric0F1
public Apcomplex hypergeometric0F1(Apcomplex a, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Confluent hypergeometric function 0F1.- Parameters:
a
- The first argument.z
- The second argument.- Returns:
- 0F1(; a; z)
- Throws:
ArithmeticException
- If the function value is not finite.ApfloatRuntimeException
- Since:
- 1.11.0
-
hypergeometric0F1Regularized
public Apcomplex hypergeometric0F1Regularized(Apcomplex a, Apcomplex z) throws ApfloatRuntimeException Regularized confluent hypergeometric function 0F̃1.- Parameters:
a
- The first argument.z
- The second argument.- Returns:
- 0F̃1(; a; z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
hypergeometric1F1
public Apcomplex hypergeometric1F1(Apcomplex a, Apcomplex b, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Kummer confluent hypergeometric function 1F1.- Parameters:
a
- The first argument.b
- The second argument.z
- The third argument.- Returns:
- 1F1(a; b; z)
- Throws:
ArithmeticException
- If the function value is not finite.ApfloatRuntimeException
- Since:
- 1.11.0
-
hypergeometric1F1Regularized
public Apcomplex hypergeometric1F1Regularized(Apcomplex a, Apcomplex b, Apcomplex z) throws ApfloatRuntimeException Regularized Kummer confluent hypergeometric function 1F̃1.- Parameters:
a
- The first argument.b
- The second argument.z
- The third argument.- Returns:
- 1F̃1(a; b; z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
hypergeometric2F1
public Apcomplex hypergeometric2F1(Apcomplex a, Apcomplex b, Apcomplex c, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Hypergeometric function 2F1.- Parameters:
a
- The first argument.b
- The second argument.c
- The third argument.z
- The fourth argument.- Returns:
- 2F1(a, b; c; z)
- Throws:
ArithmeticException
- If the function value is not finite.ApfloatRuntimeException
- Since:
- 1.11.0
-
hypergeometric2F1Regularized
public Apcomplex hypergeometric2F1Regularized(Apcomplex a, Apcomplex b, Apcomplex c, Apcomplex z) throws ApfloatRuntimeException Regularized hypergeometric function 2F̃1.- Parameters:
a
- The first argument.b
- The second argument.c
- The third argument.z
- The fourth argument.- Returns:
- 2F̃1(a, b; c; z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
hypergeometricU
public Apcomplex hypergeometricU(Apcomplex a, Apcomplex b, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Tricomi's confluent hypergeometric function U.- Parameters:
a
- The first argument.b
- The second argument.z
- The third argument.- Returns:
- U(a, b, z)
- Throws:
ArithmeticException
- If the result is not finite.ApfloatRuntimeException
- Since:
- 1.13.0
-
erf
Error function.- Parameters:
z
- The argument.- Returns:
- erf(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
erfc
Complementary error function.- Parameters:
z
- The argument.- Returns:
- erfc(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
erfi
Imaginary error function.- Parameters:
z
- The argument.- Returns:
- erfi(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
fresnelS
Fresnel integral S.- Parameters:
z
- The argument.- Returns:
- S(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
fresnelC
Fresnel integral C.- Parameters:
z
- The argument.- Returns:
- C(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
expIntegralE
public Apcomplex expIntegralE(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Exponential integral E.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Eν(z)
- Throws:
ArithmeticException
- If real part ofν
is < 0 andz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
expIntegralEi
Exponential integral Ei.- Parameters:
z
- The argument.- Returns:
- Ei(z)
- Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
logIntegral
Logarithmic integral.- Parameters:
z
- The argument.- Returns:
- li(z)
- Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
sinIntegral
Sine integral.- Parameters:
z
- The argument.- Returns:
- Si(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
cosIntegral
Cosine integral.- Parameters:
z
- The argument.- Returns:
- Ci(z)
- Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
sinhIntegral
Hyperbolic sine integral.- Parameters:
z
- The argument.- Returns:
- Shi(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
coshIntegral
Hyperbolic cosine integral.- Parameters:
z
- The argument.- Returns:
- Chi(z)
- Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
airyAi
Airy function Ai.- Parameters:
z
- The argument.- Returns:
- Ai(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
airyAiPrime
Derivative of the Airy function Ai.- Parameters:
z
- The argument.- Returns:
- Ai′(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
airyBi
Airy function Bi.- Parameters:
z
- The argument.- Returns:
- Bi(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
airyBiPrime
Derivative of the Airy function Bi.- Parameters:
z
- The argument.- Returns:
- Bi′(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
besselJ
public Apcomplex besselJ(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Bessel function of the first kind.- Parameters:
ν
- The order.z
- The argument.- Returns:
- Jν(z)
- Throws:
ArithmeticException
- If the real part ofν
is < 0 andν
is not an integer andz
is zero. Also if the real part ofν
is zero but the imaginary part is not, andz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
besselI
public Apcomplex besselI(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Modified Bessel function of the first kind.- Parameters:
ν
- The order.z
- The argument.- Returns:
- Iν(z)
- Throws:
ArithmeticException
- If the real part ofν
is < 0 andν
is not an integer andz
is zero. Also if the real part ofν
is zero but the imaginary part is not, andz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
besselY
public Apcomplex besselY(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Bessel function of the second kind.- Parameters:
ν
- The order.z
- The argument.- Returns:
- Yν(z)
- Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
besselK
public Apcomplex besselK(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Modified Bessel function of the second kind.- Parameters:
ν
- The order.z
- The argument.- Returns:
- Kν(z)
- Throws:
ArithmeticException
- Ifz
is zero.ApfloatRuntimeException
- Since:
- 1.13.0
-
ellipticK
Complete elliptic integral of the first kind.- Parameters:
z
- The argument.- Returns:
- K(z)
- Throws:
ArithmeticException
- Ifz
is one.ApfloatRuntimeException
- Since:
- 1.13.0
-
ellipticE
Complete elliptic integral of the second kind.- Parameters:
z
- The argument.- Returns:
- E(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.13.0
-
hermiteH
Hermite function.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Hν(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.14.0
-
laguerreL
Laguerre function.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Lν(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.14.0
-
laguerreL
Generalized Laguerre function.- Parameters:
ν
- The first argument.λ
- The second argument.z
- The third argument.- Returns:
- Lνλ(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.14.0
-
legendreP
public Apcomplex legendreP(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Legendre function.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Pν(z)
- Throws:
ArithmeticException
- Ifν
is not an integer andz
is -1.ApfloatRuntimeException
- Since:
- 1.14.0
-
legendreP
public Apcomplex legendreP(Apcomplex ν, Apcomplex μ, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Associated Legendre function of the first kind.- Parameters:
ν
- The first argument.μ
- The second argument.z
- The third argument.- Returns:
- Pνμ(z)
- Throws:
ArithmeticException
- Ifν
is not an integer andz
is -1.ApfloatRuntimeException
- Since:
- 1.14.0
-
legendreQ
public Apcomplex legendreQ(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Legendre function of the second kind.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Qν(z)
- Throws:
ArithmeticException
- Ifz
is 1 or -1.ApfloatRuntimeException
- Since:
- 1.14.0
-
legendreQ
public Apcomplex legendreQ(Apcomplex ν, Apcomplex μ, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Associated Legendre function of the second kind.- Parameters:
ν
- The first argument.μ
- The second argument.z
- The third argument.- Returns:
- Qνμ(z)
- Throws:
ArithmeticException
- Ifz
is 1 or -1.ApfloatRuntimeException
- Since:
- 1.14.0
-
sphericalHarmonicY
public Apcomplex sphericalHarmonicY(Apcomplex λ, Apcomplex μ, Apcomplex ϑ, Apcomplex ϕ) throws ArithmeticException, ApfloatRuntimeException Spherical harmonic function.- Parameters:
λ
- The first argument.μ
- The second argument.ϑ
- The third argument.ϕ
- The fourth argument.- Returns:
- Yλμ(ϑ, φ)
- Throws:
ArithmeticException
- Ifϑ
is π plus a multiple of 2 π and μ is not an integer and has a negative real part, or ifλ - μ
is a negative integer.ApfloatRuntimeException
- Since:
- 1.14.0
-
chebyshevT
Chebyshev function of the first kind.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Tν(z)
- Throws:
ApfloatRuntimeException
- Since:
- 1.14.0
-
chebyshevU
public Apcomplex chebyshevU(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Chebyshev function of the second kind.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Uν(z)
- Throws:
ArithmeticException
- Ifz
is -1 andν
is not an integer.ApfloatRuntimeException
- Since:
- 1.14.0
-
gegenbauerC
public Apcomplex gegenbauerC(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Renormalized Gegenbauer function.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Cν(0)(z)
- Throws:
ArithmeticException
- Ifν
is zero.ApfloatRuntimeException
- Since:
- 1.14.0
-
gegenbauerC
public Apcomplex gegenbauerC(Apcomplex ν, Apcomplex λ, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Gegenbauer function.- Parameters:
ν
- The first argument.λ
- The second argument.z
- The third argument.- Returns:
- Cνλ(z)
- Throws:
ArithmeticException
- Ifz
is -1 and real part ofλ
is > 1/2. Also ifz
is -1 andλ
is 1/2 andν
is not an integer.ApfloatRuntimeException
- Since:
- 1.14.0
-
jacobiP
public Apcomplex jacobiP(Apcomplex ν, Apcomplex a, Apcomplex b, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Jacobi function.- Parameters:
ν
- The first argument.a
- The second argument.b
- The third argument.z
- The fourth argument.- Returns:
- Pν(a,b)(z)
- Throws:
ArithmeticException
- Ifz
is -1 and real part ofb
is > 0 andν
is not a positive integer. Also ifν + a
is a negative integer andν
is not an integer.ApfloatRuntimeException
- Since:
- 1.14.0
-
fibonacci
public Apcomplex fibonacci(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Fibonacci function.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Fν(z)
- Throws:
ArithmeticException
- Ifz
is -1 andν
is not an integer.ApfloatRuntimeException
- Since:
- 1.14.0
-
eulerE
public Apcomplex eulerE(long n, Apcomplex z) throws IllegalArgumentException, ApfloatRuntimeException Euler polynomial.- Parameters:
n
- The first argument.z
- The second argument.- Returns:
- En(z)
- Throws:
IllegalArgumentException
- Ifn
< 0.ApfloatRuntimeException
- Since:
- 1.14.0
-
bernoulliB
public Apcomplex bernoulliB(long n, Apcomplex z) throws IllegalArgumentException, ApfloatRuntimeException Bernoulli polynomial.- Parameters:
n
- The first argument.z
- The second argument.- Returns:
- Bn(z)
- Throws:
IllegalArgumentException
- Ifn
< 0.ApfloatRuntimeException
- Since:
- 1.14.0
-
harmonicNumber
Harmonic number.- Parameters:
z
- The argument.- Returns:
- Hz
- Throws:
ArithmeticException
- Ifz
is a negative integer.ApfloatRuntimeException
- Since:
- 1.14.0
-
harmonicNumber
public Apcomplex harmonicNumber(Apcomplex z, Apcomplex r) throws ArithmeticException, ApfloatRuntimeException Generalized harmonic number.- Parameters:
z
- The first argument.r
- The second argument.- Returns:
- Hz(r)
- Throws:
ArithmeticException
- Ifz
is a negative integer, unlessr
has a negative real part or is zero.ApfloatRuntimeException
- Since:
- 1.14.0
-
polylog
public Apcomplex polylog(Apcomplex ν, Apcomplex z) throws ArithmeticException, ApfloatRuntimeException Polylogarithm.- Parameters:
ν
- The first argument.z
- The second argument.- Returns:
- Liν(z)
- Throws:
ArithmeticException
- If the real part ofν
is ≤ 1 andz
is 1.ApfloatRuntimeException
- Since:
- 1.14.0
-
logisticSigmoid
Logistic sigmoid.- Parameters:
z
- The argument.- Returns:
- σ(z)
- Throws:
ArithmeticException
- Ifz
is an odd integer multiple of π i.ApfloatRuntimeException
- Since:
- 1.14.0
-
ulp
Unit in the last place.- Parameters:
z
- The operand.- Returns:
- The unit in the last place.
- Throws:
ApfloatRuntimeException
- Since:
- 1.10.0
-
precision
public long precision()Returns the precision, which is used for the results.- Returns:
- The precision of the results.
-