public class Complex extends Number implements Serializable, Cloneable
add
,
subtract
, multiply
or divide
.
public static Complex op(Complex x, Complex y) // x op y public static Complex op(Complex x, double y) // x op y public static Complex op(double x, Complex y) // x op y
Complex
objects are immutable. Once created there is no way to change
their value.
The functions in this class follow the rules for complex arithmetic
as defined C9x Annex G: IEC 559-compatible complex arithmetic.
The API is not the same, but handling of infinities, NaNs, and positive
and negative zeros is intended to follow the same rules.Modifier and Type | Field and Description |
---|---|
static Complex |
i
The imaginary unit.
|
static String |
suffix
String used in converting
Complex to String . |
Constructor and Description |
---|
Complex()
Constructs a
Complex equal to zero. |
Complex(Complex z)
Constructs a
Complex equal to the argument. |
Complex(double re)
Constructs a
Complex with a zero imaginary part. |
Complex(double re,
double im)
Constructs a
Complex with real and imaginary parts given
by the input arguments. |
Modifier and Type | Method and Description |
---|---|
static double |
abs(Complex z)
Returns the absolute value (modulus) of a
Complex , |z|. |
static Complex |
acos(Complex z)
Returns the inverse cosine (arc cosine) of a
Complex ,
with branch cuts outside the interval [-1,1] along the
real axis. |
static Complex |
acosh(Complex z)
\( \DeclareMathOperator{\arccosh}{arccosh} \)
Returns the inverse hyperbolic cosine (arc cosh) of a
Complex ,
with a branch cut at values less than one along the real axis. |
static Complex |
add(Complex x,
Complex y)
Returns the sum of two
Complex objects, x+y. |
static Complex |
add(Complex x,
double y)
Returns the sum of a
Complex and a double , x+y. |
static Complex |
add(double x,
Complex y)
Returns the sum of a
double and a Complex , x+y. |
static double |
argument(Complex z)
Returns the argument (phase) of a
Complex , in radians,
with a branch cut along the negative real axis. |
static Complex |
asin(Complex z)
\( \DeclareMathOperator{\arcsinh}{arcsinh} \)
Returns the inverse sine (arc sine) of a
Complex ,
with branch cuts outside the interval [-1,1] along the
real axis. |
static Complex |
asinh(Complex z)
Returns the inverse hyperbolic sine (arc sinh) of a
Complex ,
with branch cuts outside the interval [-i,i]. |
static Complex |
atan(Complex z)
\( \DeclareMathOperator{\arctanh}{arctanh} \)
Returns the inverse tangent (arc tangent) of a
Complex ,
with branch cuts outside the interval [-i,i] along the
imaginary axis. |
static Complex |
atanh(Complex z)
Returns the inverse hyperbolic tangent (arc tanh) of a
Complex ,
with branch cuts outside the interval [-1,1] on the real axis. |
byte |
byteValue()
Returns the value of the real part as a byte.
|
int |
compareTo(Complex z)
Compares two
Complex objects. |
int |
compareTo(Object obj)
Compares this
Complex to another Object. |
static Complex |
conjugate(Complex z)
Returns the complex conjugate of a
Complex object. |
static Complex |
cos(Complex z)
Returns the cosine of a
Complex . |
static Complex |
cosh(Complex z)
Returns the hyperbolic cosh of a
Complex . |
static Complex |
divide(Complex x,
Complex y)
Returns the result of a
Complex object divided by a Complex object, x/y. |
static Complex |
divide(Complex x,
double y)
Returns the result of a
Complex object divided by a double , x/y. |
static Complex |
divide(double x,
Complex y)
Returns the result of a
double divided by a Complex object, x/y. |
double |
doubleValue()
Returns the value of the real part as a
double . |
boolean |
equals(Complex z)
Compares with another
Complex . |
boolean |
equals(Object obj)
Compares this object against the specified object.
|
static Complex |
exp(Complex z)
Returns the exponential of a
Complex z, exp(z). |
float |
floatValue()
Returns the value of the real part as a float.
|
int |
hashCode()
Returns a hashcode for this
Complex . |
double |
imag()
Returns the imaginary part of a
Complex object. |
static double |
imag(Complex z)
Returns the imaginary part of a
Complex object. |
int |
intValue()
Returns the value of the real part as an int.
|
static Complex |
log(Complex z)
Returns the logarithm of a
Complex z,
with a branch cut along the negative real axis. |
long |
longValue()
Returns the value of the real part as a long.
|
static Complex |
multiply(Complex x,
Complex y)
Returns the product of two
Complex objects, x * y. |
static Complex |
multiply(Complex x,
double y)
Returns the product of a
Complex object and a double ,
x * y. |
static Complex |
multiply(double x,
Complex y)
Returns the product of a
double and a Complex object,
x * y. |
static Complex |
multiplyImag(Complex x,
double y)
Returns the product of a
Complex object and a pure
imaginary double , x * iy. |
static Complex |
multiplyImag(double x,
Complex y)
Returns the product of a pure imaginary
double and a
Complex object, ix * y. |
static Complex |
negate(Complex z)
Returns the negative of a
Complex object, -z. |
static Complex |
pow(Complex x,
Complex y)
Returns the
Complex x raised to the Complex y power. |
static Complex |
pow(Complex z,
double x)
Returns the
Complex z raised to the x power,
with a branch cut for the first parameter (z) along the
negative real axis. |
double |
real()
Returns the real part of a
Complex object. |
static double |
real(Complex z)
Returns the real part of a
Complex object. |
short |
shortValue()
Returns the value of the real part as a short.
|
static Complex |
sin(Complex z)
Returns the sine of a
Complex . |
static Complex |
sinh(Complex z)
Returns the hyperbolic sine of a
Complex . |
static Complex |
sqrt(Complex z)
Returns the square root of a
Complex ,
with a branch cut along the negative real axis. |
static Complex |
subtract(Complex x,
Complex y)
Returns the difference of two
Complex objects, x-y. |
static Complex |
subtract(Complex x,
double y)
Returns the difference of a
Complex object and a double , x-y. |
static Complex |
subtract(double x,
Complex y)
Returns the difference of a
double and a Complex object, x-y. |
static Complex |
tan(Complex z)
Returns the tangent of a
Complex . |
static Complex |
tanh(Complex z)
Returns the hyperbolic tanh of a
Complex . |
String |
toString()
Returns a
String representation for the specified Complex . |
static Complex |
valueOf(String s)
Parses a
String into a Complex . |
public static final Complex i
public static String suffix
Complex
to String
.
Default is i, but sometimes j is desired.
Note that this is set for the class, not for
a particular instance of a Complex
.public Complex(Complex z)
Complex
equal to the argument.z
- a Complex
objectNullPointerException
- is thrown if z is nullpublic Complex(double re, double im)
Complex
with real and imaginary parts given
by the input arguments.re
- a double
value equal to the real part of the Complex
objectim
- a double
value equal to the imaginary part of the Complex
objectpublic Complex(double re)
Complex
with a zero imaginary part.re
- a double
value equal to the real part of the Complex
objectpublic Complex()
Complex
equal to zero.public boolean equals(Complex z)
Complex
.
Note: To be useful in hashtables this method
considers two NaN double
values to be equal. This
is not according to IEEE specification.
z
- a Complex
objectpublic boolean equals(Object obj)
Note: To be useful in hashtables this method
considers two NaN double
values to be equal. This
is not according to IEEE specification
public int hashCode()
Complex
.public int compareTo(Object obj)
Complex
to another Object. If the Object is a Complex
,
this function behaves like compareTo(Complex
). Otherwise, it throws
a ClassCastException (as Complex
objects are comparable only to other
Complex
objects).obj
- an Object
to be comparedint
, 0 if obj is equal to this Complex
;
a value less than 0 if this Complex
is less than obj;
and a value greater than 0 if this Complex
is greater
than obj.ClassCastException
- is thrown if obj is not a Complex
objectpublic int compareTo(Complex z)
Complex
objects.
A lexagraphical ordering is used. First the real parts are compared in the sense of Double.compareTo. If the real parts are unequal this is the return value. If the return parts are equal then the comparison of the imaginary parts is returned.
z
- a Complex
to be comparedComplex
;
a value less than 0 if this Complex
is less than z;
and a value greater than 0 if this Complex
is greater
than z.public byte byteValue()
public double doubleValue()
double
.doubleValue
in class Number
double
representing the value of the real part of a Complex
objectpublic float floatValue()
floatValue
in class Number
Complex
objectpublic int intValue()
public long longValue()
public short shortValue()
shortValue
in class Number
Complex
objectpublic double real()
Complex
object.double
representing the real part of a Complex
object, zpublic double imag()
Complex
object.double
representing the imaginary part of a Complex
object, zpublic static double real(Complex z)
Complex
object.z
- a Complex
objectdouble
representing the real part of the Complex
object, zpublic static double imag(Complex z)
Complex
object.z
- a Complex
objectdouble
representing the imaginary part of the Complex
object, zpublic static Complex negate(Complex z)
Complex
object, -z.z
- a Complex
objectComplex
initialized to
the negative of the Complex
argument, zpublic static Complex conjugate(Complex z)
Complex
object.z
- a Complex
objectComplex
initialized to the complex
conjugate of Complex
argument, zpublic static Complex add(Complex x, Complex y)
Complex
objects, x+y.x
- a Complex
objecty
- a Complex
objectComplex
initialized to x+ypublic static Complex add(Complex x, double y)
Complex
and a double
, x+y.x
- a Complex
objecty
- a double
valueComplex
initialized to x+ypublic static Complex add(double x, Complex y)
double
and a Complex
, x+y.x
- a double
valuey
- a Complex
objectComplex
initialized to x+ypublic static Complex subtract(Complex x, Complex y)
Complex
objects, x-y.x
- a Complex
objecty
- a Complex
objectComplex
initialized to x-ypublic static Complex subtract(Complex x, double y)
Complex
object and a double
, x-y.x
- a Complex
objecty
- a double
valueComplex
initialized to x-ypublic static Complex subtract(double x, Complex y)
double
and a Complex
object, x-y.x
- a double
valuey
- a Complex
objectComplex
initialized to x-ypublic static Complex multiply(Complex x, Complex y)
Complex
objects, x * y.x
- a Complex
objecty
- a Complex
objectComplex
initialized to \(x \times y\)public static Complex multiply(Complex x, double y)
Complex
object and a double
,
x * y.x
- a Complex
objecty
- a double
valueComplex
initialized to \(x \times y\)public static Complex multiply(double x, Complex y)
double
and a Complex
object,
x * y.x
- a double
valuey
- a Complex
objectComplex
initialized to \(x \times y\)public static Complex multiplyImag(Complex x, double y)
Complex
object and a pure
imaginary double
, x * iy.x
- a Complex
objecty
- a double
value representing a pure imaginaryComplex
initialized to x * iypublic static Complex multiplyImag(double x, Complex y)
double
and a
Complex
object, ix * y.x
- a double
value representing a pure imaginaryy
- a Complex
objectComplex
initialized to \(ix \times y\).public static Complex divide(Complex x, Complex y)
Complex
object divided by a Complex
object, x/y.x
- a Complex
object representing the numeratory
- a Complex
object representing the denominatorComplex
initialized to x/ypublic static Complex divide(Complex x, double y)
Complex
object divided by a double
, x/y.x
- a Complex
object representing the numeratory
- a double
representing the denominatorComplex
initialized to x/ypublic static Complex divide(double x, Complex y)
double
divided by a Complex
object, x/y.x
- a double
valuey
- a Complex
object representing the denominatorComplex
initialized to x/ypublic static double abs(Complex z)
Complex
, |z|.z
- a Complex
objectdouble
value equal to the absolute value of the argumentpublic static double argument(Complex z)
Complex
, in radians,
with a branch cut along the negative real axis.z
- a Complex
objectdouble
value equal to the argument (or phase) of a Complex
.
It is in the interval \([-\pi,\pi]\).public static Complex sqrt(Complex z)
Complex
,
with a branch cut along the negative real axis.
Specifically, if z = x+iy,
\({\rm sqrt}(\bar{z}) = \overline{{\rm sqrt}(z)}\).
\({\rm sqrt}(\pm 0 + i0)\) returns \(+0 + i0\).
\({\rm sqrt}(-\infty + iy)\)
returns \(+0 + i\infty\),
for finite positive-signed y.
\({\rm sqrt}(+\infty + iy)\)
returns \(+ \infty + i0\),
for finite positive-signed y.
\({\rm sqrt}(x+i\infty)\)
returns \(+ \infty + i \infty\), for all x (including NaN).
\({\rm sqrt}(-\infty + i \mathrm{NaN})\)
returns \(\mathrm{NaN} \pm i \infty\) (where the sign of the imaginary part of the result is unspecified).
\({\rm sqrt}(+\infty + i \mathrm{NaN})\)
returns \(+\infty + i \mathrm{NaN}\).
\({\rm sqrt}(x + i \mathrm{NaN})\) returns \(\mathrm{NaN} + i \mathrm{NaN}\) and optionally raises the invalid exception, for finite x.
\({\rm sqrt}(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i \mathrm{NaN}\) and optionally raises the invalid exception, for finite y.
\({\rm sqrt}(\mathrm{NaN} + i \mathrm{NaN})\) returns \(\mathrm{NaN} + i \mathrm{NaN}\).
z
- a Complex
objectComplex
initialized
to square root of z.public static Complex exp(Complex z)
Complex
z, exp(z).
Specifically, if z = x+iy,
\(\exp(\bar{z}) = \overline{\exp(z)}\).
\(\exp(\pm 0 + i0)\) returns \(1 + i0\).
\(\exp(+\infty + i0)\) returns \(+\infty + i0\).
\(\exp(-\infty + i\infty )\) returns \(\pm 0 \pm i0\) (where the signs of the real and imaginary parts of the result are unspecified).
\(\exp(+\infty + i\infty )\) returns \(\pm \infty + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\exp(x + i\infty )\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
\(\exp(-\infty + iy)\) returns \(+0 [\cos(y)+i\sin(y)]\), for finite y.
\(\exp(+\infty + iy)\) returns \(+\infty [\cos(y)+i\sin(y)]\), for finite nonzero y.
\(\exp(-\infty + i\mathrm{NaN})\) returns \(\pm 0 \pm i0\) (where the signs of the real and imaginary parts of the result are unspecified).
\(\exp(+\infty + i\mathrm{NaN})\) returns \(\pm \infty + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\exp(\mathrm{NaN} + i0)\) returns \(\mathrm{NaN} + i0\).
\(\exp(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for all non-zero numbers y.
\(\exp(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
z
- a Complex
objectComplex
initialized to the exponential
of the argumentpublic static Complex log(Complex z)
Complex
z,
with a branch cut along the negative real axis.
Specifically, if z = x+iy,
\(\log(\bar{z}) = \overline{\log(z)}\).
\(\log(0 + i0)\) returns \(- \infty + i\pi\).
\(\log(+0 + i0)\) returns \(- \infty + i0\).
\(\log(-\infty + i \infty )\) returns \(+ \infty + i3 \pi/4\).
\(\log(+\infty + i \infty )\) returns \(+ \infty + i \pi/4\).
\(\log(x + i \infty )\) returns \(+ \infty + i \pi/2\), for finite x.
\(\log(-\infty + iy)\) returns \(+ \infty + i \pi\), for finite positive-signed y.
\(\log(+\infty + iy)\) returns \(+ \infty + i0\), for finite positive-signed y.
\(\log(\pm \infty + i\mathrm{NaN})\) returns \(+ \infty + i\mathrm{NaN}\).
\(\log(\mathrm{NaN} + i \infty )\) returns \(+ \infty + i\mathrm{NaN}\).
\(\log(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
\(\log(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite y.
\(\log(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to the logarithm
of the argument. Its imaginary part is in the
interval \([-i\pi,i\pi]\).public static Complex sin(Complex z)
Complex
.
The value of sin is defined in terms of the function sinh, by
\(\sin(z) = -i \sinh(iz)\).z
- a Complex
objectComplex
initialized to the sine
of the argumentComplex.sinh(com.imsl.math.Complex)
public static Complex cos(Complex z)
Complex
.
The value of cos is defined in terms of the function cosh, by
\(\cos(z) = \cosh(iz)\).z
- a Complex
objectComplex
initialized to the cosine of
the argumentComplex.cosh(com.imsl.math.Complex)
public static Complex tan(Complex z)
Complex
.
The value of tan is defined in terms of the function tanh, by
\(\tan(z) = -i \tanh(iz)\).z
- a Complex
objectComplex
initialized
to the tangent of the argumentComplex.tanh(com.imsl.math.Complex)
public static Complex asin(Complex z)
Complex
,
with branch cuts outside the interval [-1,1] along the
real axis.
The value of asin is defined in terms of the function asinh, by
\(\arcsin(z) = -i \arcsinh(iz)\).z
- a Complex
objectComplex
initialized to the inverse
(arc) sine of the argument. The real part of the
result is in the interval \([-\pi/2,+\pi/2]\).Complex.asinh(com.imsl.math.Complex)
public static Complex acos(Complex z)
Complex
,
with branch cuts outside the interval [-1,1] along the
real axis.
Specifically, if z = x+iy,
\(\arccos(\bar{z}) = \overline{\arccos(z)}\).
\(\arccos(\pm 0 + i0)\) returns \(\pi/2 - i0\).
\(\arccos(-\infty + i\infty)\) returns \(3 \pi/4 - i\infty\).
\(\arccos(+\infty + i\infty)\) returns \(\pi/4 - i\infty\).
\(\arccos(x + i\infty )\) returns \(\pi/2 - i\infty\), for finite x.
\(\arccos(-\infty + iy)\) returns \(\pi- i\infty\), for positive-signed finite y.
\(\arccos(+\infty + iy)\) returns \(+0 - i\infty\), for positive-signed finite y.
\(\arccos(\pm \infty + i\mathrm{NaN})\) returns \(\mathrm{NaN} \pm i\infty\) (where the sign of the imaginary part of the result is unspecified).
\(\arccos(\pm 0 + i\mathrm{NaN})\) returns \(\pi/2 + i\mathrm{NaN}\).
\(\arccos(\mathrm{NaN} + i\infty)\) returns \(\mathrm{NaN} - i\infty\).
\(\arccos(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for nonzero finite x.
\(\arccos(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite y.
\(\arccos(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to the
inverse (arc) cosine of the argument.
The real part of the result is in the interval \([0,\pi]\).public static Complex atan(Complex z)
Complex
,
with branch cuts outside the interval [-i,i] along the
imaginary axis.
The value of atan is defined in terms of the function atanh, by
\(\arctan(z) = -i \arctanh(iz)\).z
- a Complex
objectComplex
initialized to the
inverse (arc) tangent of the argument.
Its real part is in the interval \([-\pi/2,\pi/2]\).Complex.atanh(com.imsl.math.Complex)
public static Complex sinh(Complex z)
Complex
.
If z = x+iy,
\(\sinh(\bar{z}) = \overline{\sinh(z)}\) and sinh is odd.
\(\sinh(+0 + i0)\) returns \(+0 + i0\).
\(\sinh(+0 + i\infty )\) returns \(\pm 0 + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\sinh(+\infty + i0)\) returns \(+\infty + i0\).
\(\sinh(+\infty + i\infty )\) returns \(\pm \infty + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\sinh(+\infty + iy)\) returns \(+\infty [\cos(y)+i\sin(y)]\), for positive finite y.
\(\sinh(x + i\infty )\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for positive finite x.
\(\sinh(+0 + i\mathrm{NaN})\) returns \(\pm 0 + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\sinh(+\infty + i\mathrm{NaN})\) returns \(\pm \infty + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\sinh(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite nonzero x.
\(\sinh(\mathrm{NaN} + i0)\) returns \(\mathrm{NaN} + i0\).
\(\sinh(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for all nonzero numbers y.
\(\sinh(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to the hyperbolic
sine of the argumentpublic static Complex cosh(Complex z)
Complex
.
If z = x+iy,
\(\cosh(\bar{z}) = \overline{\cosh(z)}\) and cosh is even.
\(\cosh(+0 + i0)\) returns \(1 + i0\).
\(\cosh(+0 + i\infty )\) returns \(\mathrm{NaN} \pm i0\) (where the sign of the imaginary part of the result is unspecified).
\(\cosh(+\infty + i0)\) returns \(+\infty + i0\).
\(\cosh(+\infty + i\infty )\) returns \(+\infty + i\mathrm{NaN}\).
\(\cosh(x + i\infty )\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite nonzero x.
\(\cosh(+\infty + iy)\) returns \(+\infty [\cos(y)+i\sin(y)]\), for finite nonzero y.
\(\cosh(+0 + i\mathrm{NaN})\) returns \(\mathrm{NaN} \pm i0\) (where the sign of the imaginary part of the result is unspecified).
\(\cosh(+\infty + i\mathrm{NaN})\) returns \(+\infty + i\mathrm{NaN}\).
\(\cosh(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite nonzero x.
\(\cosh(\mathrm{NaN} + i0)\) returns \(\mathrm{NaN} \pm i0\) (where the sign of the imaginary part of the result is unspecified).
\(\cosh(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for all nonzero numbers y.
\(\cosh(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to
the hyperbolic cosine of the argumentpublic static Complex tanh(Complex z)
Complex
.
If z = x+iy,
\(\tanh(\bar{z}) = \overline{\tanh(z)}\) and tanh is odd.
\(\tanh(+0 + i0)\) returns \(+0 + i0\).
\(\tanh(+\infty + iy)\) returns \(1 + i0\), for all positive-signed numbers y.
\(\tanh(x + i\infty )\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
\(\tanh(+\infty + i\mathrm{NaN})\) returns \(1 \pm i0\) (where the sign of the imaginary part of the result is unspecified).
\(\tanh(\mathrm{NaN} + i0)\) returns \(\mathrm{NaN} + i0\).
\(\tanh(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for all nonzero numbers y.
\(\tanh(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
\(\tanh(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to
the hyperbolic tangent of the argumentpublic static Complex asinh(Complex z)
Complex
,
with branch cuts outside the interval [-i,i].
Specifically, if z = x+iy,
\(\arcsinh(\bar{z}) = \overline{\arcsinh(z)}\) and asinh is odd.
\(\arcsinh(+0 + i0)\) returns \(0 + i0\).
\(\arcsinh(\infty + i\infty )\) returns \(+\infty + i \pi/4\).
\(\arcsinh(x + i\infty )\) returns \(+\infty + i \pi/2\) for positive-signed finite x.
\(\arcsinh(+\infty + iy)\) returns \(+\infty + i0\) for positive-signed finite y.
\(\arcsinh(\mathrm{NaN} + i\infty )\) returns \(\pm \infty + i\mathrm{NaN}\) (where the sign of the real part of the result is unspecified).
\(\arcsinh(+\infty + i\mathrm{NaN})\) returns \(+\infty + i\mathrm{NaN}\).
\(\arcsinh(\mathrm{NaN} + i0)\) returns \(\mathrm{NaN} + i0\).
\(\arcsinh(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite nonzero y.
\(\arcsinh(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
\(\arcsinh(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to the
inverse (arc) hyperbolic sine of the argument.
Its imaginary part is in the interval \([-i\pi/2,i\pi/2]\).public static Complex acosh(Complex z)
Complex
,
with a branch cut at values less than one along the real axis.
Specifically, if z = x+iy,
\(\arccosh(\bar{z}) = \overline{\arccosh(z)}\).
\(\arccosh(\pm 0 + i0)\) returns \(+0 + i\pi/2\).
\(\arccosh(-\infty + i\infty )\) returns \(+\infty + i3 \pi/4\).
\(\arccosh(+\infty + i\infty )\) returns \(+\infty + i \pi/4\).
\(\arccosh(x + i\infty )\) returns \(+\infty + i \pi/2\), for finite x.
\(\arccosh(-\infty + iy)\) returns \(+\infty + i \pi\), for positive-signed finite y.
\(\arccosh(+\infty + iy)\) returns \(+\infty + i0\), for positive-signed finite y.
\(\arccosh(\mathrm{NaN} + i\infty )\) returns \(+\infty + i\mathrm{NaN}\).
\(\arccosh(\pm \infty + i\mathrm{NaN})\) returns \(+\infty + i\mathrm{NaN}\).
\(\arccosh(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite x.
\(\arccosh(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite y.
\(\arccosh(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to the
inverse (arc) hyperbolic cosine of the argument.
The real part of the result is non-negative and its
imaginary part is in the interval \([-i\pi,i\pi]\).public static Complex atanh(Complex z)
Complex
,
with branch cuts outside the interval [-1,1] on the real axis.
Specifically, if z = x+iy,
\(\arctanh(\bar{z}) = \overline{\arctanh(z)}\) and atanh is odd.
\(\arctanh(+0 + i0)\) returns \(+0 + i0\).
\(\arctanh(+\infty + i\infty )\) returns \(+0 + i\pi/2\).
\(\arctanh(+\infty + iy)\) returns \(+0 + i\pi/2\), for finite positive-signed y.
\(\arctanh(x + i\infty )\) returns \(+0 + i\pi/2\), for finite positive-signed x.
\(\arctanh(+0 + i\mathrm{NaN})\) returns \(+0 + i\mathrm{NaN}\).
\(\arctanh(\mathrm{NaN} + i\infty )\) returns \(\pm 0 + i pi/2\) (where the sign of the real part of the result is unspecified).
\(\arctanh(+\infty + i\mathrm{NaN})\) returns \(+0 + i\mathrm{NaN}\).
\(\arctanh(\mathrm{NaN} + iy)\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for finite y.
\(\arctanh(x + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\), for nonzero finite x.
\(\arctanh(\mathrm{NaN} + i\mathrm{NaN})\) returns \(\mathrm{NaN} + i\mathrm{NaN}\).
z
- a Complex
objectComplex
initialized to the
inverse (arc) hyperbolic tangent of the argument.
The imaginary part of the result is in the interval
\([-i\pi/2,i\pi/2]\).public static Complex pow(Complex z, double x)
Complex
z raised to the x power,
with a branch cut for the first parameter (z) along the
negative real axis.z
- a Complex
objectx
- a double
valueComplex
initialized to z to the power xpublic static Complex pow(Complex x, Complex y)
Complex
x raised to the Complex
y power.
The value of pow is defined in terms of the functions exp and log, by
\({\rm pow}(x,y) = \exp(y \log(x))\).x
- a Complex
objecty
- a Complex
objectComplex
initialized to \(x^y\).Complex.exp(com.imsl.math.Complex)
,
Complex.log(com.imsl.math.Complex)
public String toString()
String
representation for the specified Complex
.public static Complex valueOf(String s) throws NumberFormatException
String
into a Complex
.s
- the String
to be parsedComplex
initialized to the value
represented by the String
argumentNumberFormatException
- if the string does not contain a parsable Complex
numberNullPointerException
- if the input argument is nullCopyright © 2020 Rogue Wave Software. All rights reserved.