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