Package org.apfloat
Class FixedPrecisionApcomplexHelper
- java.lang.Object
-
- org.apfloat.FixedPrecisionApcomplexHelper
-
- Direct Known Subclasses:
FixedPrecisionApfloatHelper
public class FixedPrecisionApcomplexHelper extends java.lang.ObjectFixed-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
InfiniteExpansionExceptione.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 longprecision
-
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 Apfloatabs(Apcomplex z)Absolute value.Apcomplexacos(Apcomplex z)Arc cosine.Apcomplexacosh(Apcomplex z)Hyperbolic arc cosine.Apcomplexadd(Apcomplex z, Apcomplex w)Addition.Apcomplexagm(Apcomplex a, Apcomplex b)Arithmetic-geometric mean.ApcomplexairyAi(Apcomplex z)Airy function Ai.ApcomplexairyAiPrime(Apcomplex z)Derivative of the Airy function Ai.ApcomplexairyBi(Apcomplex z)Airy function Bi.ApcomplexairyBiPrime(Apcomplex z)Derivative of the Airy function Bi.Apcomplex[]allRoots(Apcomplex z, int n)All branches of a root.Apfloatarg(Apcomplex z)Complex angle.Apcomplexasin(Apcomplex z)Arc sine.Apcomplexasinh(Apcomplex z)Hyperbolic arc sine.Apcomplexatan(Apcomplex z)Arc tangent.Apcomplexatanh(Apcomplex z)Hyperbolic arc tangent.Apfloatbernoulli(long n)Bernoulli number.Apfloatbernoulli(long n, int radix)Bernoulli number.ApcomplexbernoulliB(long n, Apcomplex z)Bernoulli polynomial.ApcomplexbesselI(Apcomplex ν, Apcomplex z)Modified Bessel function of the first kind.ApcomplexbesselJ(Apcomplex ν, Apcomplex z)Bessel function of the first kind.ApcomplexbesselK(Apcomplex ν, Apcomplex z)Modified Bessel function of the second kind.ApcomplexbesselY(Apcomplex ν, Apcomplex z)Bessel function of the second kind.Apcomplexbeta(Apcomplex a, Apcomplex b)Beta function.Apcomplexbeta(Apcomplex z, Apcomplex a, Apcomplex b)Incomplete beta function.Apcomplexbeta(Apcomplex z1, Apcomplex z2, Apcomplex a, Apcomplex b)Generalized incomplete beta function.Apfloatbinomial(long n, long k)Binomial coefficient.Apfloatbinomial(long n, long k, int radix)Binomial coefficient.Apcomplexbinomial(Apcomplex n, Apcomplex k)Binomial coefficient.Apfloatcatalan()Catalan's constant G.Apfloatcatalan(int radix)Catalan's constant G.Apcomplexcbrt(Apcomplex z)Cube root.ApcomplexchebyshevT(Apcomplex ν, Apcomplex z)Chebyshev function of the first kind.ApcomplexchebyshevU(Apcomplex ν, Apcomplex z)Chebyshev function of the second kind.private ApcomplexcheckSmallLinear(Apcomplex z)Apcomplexconj(Apcomplex z)Complex conjugate.Apcomplexcos(Apcomplex z)Cosine.Apcomplexcosh(Apcomplex z)Hyperbolic cosine.ApcomplexcoshIntegral(Apcomplex z)Hyperbolic cosine integral.ApcomplexcosIntegral(Apcomplex z)Cosine integral.Apcomplexdigamma(Apcomplex z)Digamma function.Apcomplexdivide(Apcomplex z, Apcomplex w)Division.Apfloate()e.Apfloate(int radix)e.ApcomplexellipticE(Apcomplex z)Complete elliptic integral of the second kind.ApcomplexellipticK(Apcomplex z)Complete elliptic integral of the first kind.Apcomplexerf(Apcomplex z)Error function.Apcomplexerfc(Apcomplex z)Complementary error function.Apcomplexerfi(Apcomplex z)Imaginary error function.Apfloateuler()γ, the Euler-Mascheroni constant.Apfloateuler(int radix)γ, the Euler-Mascheroni constant.ApcomplexeulerE(long n, Apcomplex z)Euler polynomial.Apcomplexexp(Apcomplex z)Exponential function.ApcomplexexpIntegralE(Apcomplex ν, Apcomplex z)Exponential integral E.ApcomplexexpIntegralEi(Apcomplex z)Exponential integral Ei.Apcomplexfibonacci(Apcomplex ν, Apcomplex z)Fibonacci function.ApcomplexfresnelC(Apcomplex z)Fresnel integral C.ApcomplexfresnelS(Apcomplex z)Fresnel integral S.Apcomplexgamma(Apcomplex z)Gamma function.Apcomplexgamma(Apcomplex a, Apcomplex z)Incomplete gamma function.Apcomplexgamma(Apcomplex a, Apcomplex z0, Apcomplex z1)Generalized incomplete gamma function.ApcomplexgegenbauerC(Apcomplex ν, Apcomplex z)Renormalized Gegenbauer function.ApcomplexgegenbauerC(Apcomplex ν, Apcomplex λ, Apcomplex z)Gegenbauer function.Apfloatglaisher()The Glaisher-Kinkelin constant A.Apfloatglaisher(int radix)The Glaisher-Kinkelin constant A.ApcomplexharmonicNumber(Apcomplex z)Harmonic number.ApcomplexharmonicNumber(Apcomplex z, Apcomplex r)Generalized harmonic number.ApcomplexhermiteH(Apcomplex ν, Apcomplex z)Hermite function.Apcomplexhypergeometric0F1(Apcomplex a, Apcomplex z)Confluent hypergeometric function 0F1.Apcomplexhypergeometric0F1Regularized(Apcomplex a, Apcomplex z)Regularized confluent hypergeometric function 0F̃1.Apcomplexhypergeometric1F1(Apcomplex a, Apcomplex b, Apcomplex z)Kummer confluent hypergeometric function 1F1.Apcomplexhypergeometric1F1Regularized(Apcomplex a, Apcomplex b, Apcomplex z)Regularized Kummer confluent hypergeometric function 1F̃1.Apcomplexhypergeometric2F1(Apcomplex a, Apcomplex b, Apcomplex c, Apcomplex z)Hypergeometric function 2F1.Apcomplexhypergeometric2F1Regularized(Apcomplex a, Apcomplex b, Apcomplex c, Apcomplex z)Regularized hypergeometric function 2F̃1.ApcomplexhypergeometricU(Apcomplex a, Apcomplex b, Apcomplex z)Tricomi's confluent hypergeometric function U.Apfloatimag(Apcomplex z)Imaginary part.ApcomplexinverseRoot(Apcomplex z, long n)Inverse root.ApcomplexinverseRoot(Apcomplex z, long n, long k)Inverse root with branch.ApcomplexjacobiP(Apcomplex ν, Apcomplex a, Apcomplex b, Apcomplex z)Jacobi function.Apfloatkhinchin()Khinchin's constant K.Apfloatkhinchin(int radix)Khinchin's constant K.ApcomplexlaguerreL(Apcomplex ν, Apcomplex z)Laguerre function.ApcomplexlaguerreL(Apcomplex ν, Apcomplex λ, Apcomplex z)Generalized Laguerre function.ApcomplexlegendreP(Apcomplex ν, Apcomplex z)Legendre function.ApcomplexlegendreP(Apcomplex ν, Apcomplex μ, Apcomplex z)Associated Legendre function of the first kind.ApcomplexlegendreQ(Apcomplex ν, Apcomplex z)Legendre function of the second kind.ApcomplexlegendreQ(Apcomplex ν, Apcomplex μ, Apcomplex z)Associated Legendre function of the second kind.Apcomplexlog(Apcomplex z)Natural logarithm.Apcomplexlog(Apcomplex z, Apcomplex w)Logarithm in specified base.ApcomplexlogGamma(Apcomplex z)Logarithm of the gamma function.ApcomplexlogIntegral(Apcomplex z)Logarithmic integral.ApcomplexlogisticSigmoid(Apcomplex z)Logistic sigmoid.Apcomplexmultiply(Apcomplex z, Apcomplex w)Multiplication.Apcomplexnegate(Apcomplex z)Negation.Apfloatnorm(Apcomplex z)Norm.(package private) Apfloatpi()(package private) Apfloatpi(int radix)Apcomplexpochhammer(Apcomplex z, Apcomplex n)Pochhammer symbol.Apcomplexpolygamma(long n, Apcomplex z)Polygamma function.Apcomplexpolylog(Apcomplex ν, Apcomplex z)Polylogarithm.Apcomplexpow(Apcomplex z, long n)Integer power.Apcomplexpow(Apcomplex z, Apcomplex w)Power.longprecision()Returns the precision, which is used for the results.Apcomplexproduct(Apcomplex... z)Product.Apfloatreal(Apcomplex z)Real part.Apcomplexroot(Apcomplex z, long n)Root.Apcomplexroot(Apcomplex z, long n, long k)Root with branch.Apcomplexscale(Apcomplex z, long scale)Move the radix point.private ApcomplexsetErfPrecision(Apcomplex z)(package private) ApfloatsetErfPrecision(Apfloat x)(package private) ApfloatsetExponentialPrecision(Apfloat x)private ApcomplexsetExpTrigPrecision(Apcomplex z)private ApcomplexsetGammaPrecision(Apcomplex z)(package private) ApfloatsetGammaPrecision(Apfloat x)private ApcomplexsetLogarithmicPrecision(Apcomplex z)(package private) ApfloatsetLogarithmicPrecision(Apfloat x)private ApcomplexsetPrecision(Apcomplex z)private Apcomplex[]setPrecision(Apcomplex[] z)private ApcomplexsetTrigExpPrecision(Apcomplex z)(package private) ApfloatsetTrigonometricPrecision(Apfloat x)private ApcomplexsetZetaPrecision(Apcomplex z)(package private) ApfloatsetZetaPrecision(Apfloat x)Apcomplexsin(Apcomplex z)Sine.Apcomplexsinc(Apcomplex z)Sinc.Apcomplexsinh(Apcomplex z)Hyperbolic sine.ApcomplexsinhIntegral(Apcomplex z)Hyperbolic sine integral.ApcomplexsinIntegral(Apcomplex z)Sine integral.ApcomplexsphericalHarmonicY(Apcomplex λ, Apcomplex μ, Apcomplex ϑ, Apcomplex ϕ)Spherical harmonic function.Apcomplexsqrt(Apcomplex z)Square root.Apcomplexsubtract(Apcomplex z, Apcomplex w)Subtraction.Apcomplexsum(Apcomplex... z)Sum.Apcomplextan(Apcomplex z)Tangent.Apcomplextanh(Apcomplex z)Hyperbolic tangent.Apfloatulp(Apcomplex z)Unit in the last place.ApcomplexvalueOf(Apcomplex z)Returns the value with the specified precision.(package private) ApfloatvalueOf(Apfloat x)Apcomplexw(Apcomplex z)Lambert W function.Apcomplexw(Apcomplex z, long k)Lambert W function for the specified branch.Apcomplexzeta(Apcomplex s)Riemann zeta function.Apcomplexzeta(Apcomplex s, Apcomplex a)Hurwitz zeta function.
-
-
-
Constructor Detail
-
FixedPrecisionApcomplexHelper
public FixedPrecisionApcomplexHelper(long precision) throws java.lang.IllegalArgumentExceptionConstructs 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 ywherezisx + 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- Ifwis 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- Ifzandware 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- Ifzandnare zero, orzis zero andnis negative.ApfloatRuntimeException
-
arg
public Apfloat arg(Apcomplex z) throws java.lang.ArithmeticException, ApfloatRuntimeException
Complex angle.- Parameters:
z- The operand.- Returns:
- The angle of
zon the complex plane. - Throws:
java.lang.ArithmeticException- Ifzis 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 + y2wherezisx + 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- Ifzisi.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- Ifzis 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- Ifzis 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-
wlogarithm ofz. - Throws:
java.lang.ArithmeticException- Ifzorwis 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- Ifzis π/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- Ifzis 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
aandb. - 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- Ifzornis 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- Ifzornis 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- Ifnis zero, orzis zero andnis 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/nwheresis the signum of the imaginary part ofz.- Throws:
java.lang.ArithmeticException- Ifnis zero, orzis zero andnis 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- Ifnis zero, orzis zero andnis 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- Ifzis 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- Ifais a nonpositive integer andzis 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- Ifais a nonpositive integer and eitherz0orz1is 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- Ifzis 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- Ifzis 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- Ifnis negative orzis 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- Ifaorbis a nonpositive integer buta + bis not. Also if bothaandbare 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- Ifais a nonpositive integer orzis zero andahas 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- Ifais a nonpositive integer orz1orz2is zero andahas 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 + nis a nonpositive integer butzis 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- Ifnorkis 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- Ifnorkis 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,korn - kis 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- Ifsis1.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- Ifsis1or ifais 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 andzis 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- Ifzis 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- Ifzis 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- Ifzis 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- Ifzis 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 andzis zero. Also if the real part ofνis zero but the imaginary part is not, andzis 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 andzis zero. Also if the real part ofνis zero but the imaginary part is not, andzis 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- Ifzis 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- Ifzis 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- Ifzis 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 andzis -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 andzis -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- Ifzis 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- Ifzis 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- Ifzis -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- Ifzis -1 and real part ofλis > 1/2. Also ifzis -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- Ifzis -1 and real part ofbis > 0 andνis not a positive integer. Also ifν + ais 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- Ifzis -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- Ifzis 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- Ifzis a negative integer, unlessrhas 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 andzis 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- Ifzis 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.NumberFormatExceptionApfloatRuntimeException
-
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
-
-