JMSLTM Numerical Library 7.2.0
com.imsl.math

## Class Complex

• All Implemented Interfaces:
Serializable, Cloneable

```public class Complex
extends Number
implements Serializable, Cloneable```
Set of mathematical functions for complex numbers. It provides the basic operations (addition, subtraction, multiplication, division) as well as a set of complex functions. The binary operations have the form, where op is `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.
Example, Serialized Form
• ### Field Summary

Fields
Modifier and Type Field and Description
`static Complex` `i`
The imaginary unit.
`static String` `suffix`
String used in converting `Complex` to `String`.
• ### Constructor Summary

Constructors
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.
• ### Method Summary

Methods
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)`
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)`
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)`
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`.
• ### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`
• ### Field Detail

• #### i

`public static final Complex i`
The imaginary unit. This constant is set to new Complex(0,1).
• #### suffix

`public static String suffix`
String used in converting `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`.
• ### Constructor Detail

• #### Complex

`public Complex()`
Constructs a `Complex` equal to zero.
• #### Complex

`public Complex(Complex z)`
Constructs a `Complex` equal to the argument.
Parameters:
`z` - a `Complex` object
Throws:
`NullPointerException` - is thrown if z is null
• #### Complex

`public Complex(double re)`
Constructs a `Complex` with a zero imaginary part.
Parameters:
`re` - a `double` value equal to the real part of the `Complex` object
• #### Complex

```public Complex(double re,
double im)```
Constructs a `Complex` with real and imaginary parts given by the input arguments.
Parameters:
`re` - a `double` value equal to the real part of the `Complex` object
`im` - a `double` value equal to the imaginary part of the `Complex` object
• ### Method Detail

• #### abs

`public static double abs(Complex z)`
Returns the absolute value (modulus) of a `Complex`, |z|.
Parameters:
`z` - a `Complex` object
Returns:
a `double` value equal to the absolute value of the argument
• #### acos

`public 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.

Specifically, if z = x+iy,
.
returns .
returns .
returns .
returns , for finite x.
returns , for positive-signed finite y.
returns , for positive-signed finite y.
returns (where the sign of the imaginary part of the result is unspecified).
returns .
returns .
returns , for nonzero finite x.
returns , for finite y.
returns .

Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to the inverse (arc) cosine of the argument. The real part of the result is in the interval .
• #### acosh

`public static Complex acosh(Complex z)`
Returns the inverse hyperbolic cosine (arc cosh) of a `Complex`, with a branch cut at values less than one along the real axis.

Specifically, if z = x+iy,
.
returns .
returns .
returns .
returns , for finite x.
returns , for positive-signed finite y.
returns , for positive-signed finite y.
returns .
returns .
returns , for finite x.
returns , for finite y.
returns .

Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` 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 .

```public static Complex add(Complex x,
Complex y)```
Returns the sum of two `Complex` objects, x+y.
Parameters:
`x` - a `Complex` object
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to x+y

```public static Complex add(Complex x,
double y)```
Returns the sum of a `Complex` and a `double`, x+y.
Parameters:
`x` - a `Complex` object
`y` - a `double` value
Returns:
a newly constructed `Complex` initialized to x+y

```public static Complex add(double x,
Complex y)```
Returns the sum of a `double` and a `Complex`, x+y.
Parameters:
`x` - a `double` value
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to x+y
• #### argument

`public static double argument(Complex z)`
Returns the argument (phase) of a `Complex`, in radians, with a branch cut along the negative real axis.
Parameters:
`z` - a `Complex` object
Returns:
A `double` value equal to the argument (or phase) of a `Complex`. It is in the interval .
• #### asin

`public static Complex asin(Complex z)`
Returns the inverse sine (arc sine) of a `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 .
Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to the inverse (arc) sine of the argument. The real part of the result is in the interval .
`asinh(com.imsl.math.Complex)`
• #### asinh

`public static Complex asinh(Complex z)`
Returns the inverse hyperbolic sine (arc sinh) of a `Complex`, with branch cuts outside the interval [-i,i].

Specifically, if z = x+iy,
and asinh is odd.
returns .
returns .
returns for positive-signed finite x.
returns for positive-signed finite y.
returns (where the sign of the real part of the result is unspecified).
returns .
returns .
returns , for finite nonzero y.
returns , for finite x.
returns .

Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to the inverse (arc) hyperbolic sine of the argument. Its imaginary part is in the interval .
• #### atan

`public static Complex atan(Complex z)`
Returns the inverse tangent (arc tangent) of a `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 .
Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to the inverse (arc) tangent of the argument. Its real part is in the interval .
`atanh(com.imsl.math.Complex)`
• #### atanh

`public 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.

Specifically, if z = x+iy,
and atanh is odd.
returns .
returns .
returns , for finite positive-signed y.
returns , for finite positive-signed x.
returns .
returns (where the sign of the real part of the result is unspecified).
returns .
returns , for finite y.
returns , for nonzero finite x.
returns .

Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to the inverse (arc) hyperbolic tangent of the argument. The imaginary part of the result is in the interval .
• #### byteValue

`public byte byteValue()`
Returns the value of the real part as a byte.
Overrides:
`byteValue` in class `Number`
Returns:
a byte representing the value of the real part of a `Complex` object
• #### compareTo

`public int compareTo(Complex z)`
Compares two `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.

Parameters:
`z` - a `Complex` to be compared
Returns:
The value 0 if z is equal to this `Complex`; 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.
• #### compareTo

`public int compareTo(Object obj)`
Compares this `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).
Parameters:
`obj` - an `Object` to be compared
Returns:
an `int`, 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.
Throws:
`ClassCastException` - is thrown if obj is not a `Complex` object
• #### conjugate

`public static Complex conjugate(Complex z)`
Returns the complex conjugate of a `Complex` object.
Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the complex conjugate of `Complex` argument, z
• #### cos

`public static Complex cos(Complex z)`
Returns the cosine of a `Complex`. The value of cos is defined in terms of the function cosh, by .
Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the cosine of the argument
`cosh(com.imsl.math.Complex)`
• #### cosh

`public static Complex cosh(Complex z)`
Returns the hyperbolic cosh of a `Complex`.

If z = x+iy,
and cosh is even.
returns .
returns (where the sign of the imaginary part of the result is unspecified).
returns .
returns .
returns , for finite nonzero x.
returns , for finite nonzero y.
returns (where the sign of the imaginary part of the result is unspecified).
returns .
returns , for finite nonzero x.
returns (where the sign of the imaginary part of the result is unspecified).
returns , for all nonzero numbers y.
returns .

Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the hyperbolic cosine of the argument
• #### divide

```public static Complex divide(Complex x,
Complex y)```
Returns the result of a `Complex` object divided by a `Complex` object, x/y.
Parameters:
`x` - a `Complex` object representing the numerator
`y` - a `Complex` object representing the denominator
Returns:
a newly constructed `Complex` initialized to x/y
• #### divide

```public static Complex divide(Complex x,
double y)```
Returns the result of a `Complex` object divided by a `double`, x/y.
Parameters:
`x` - a `Complex` object representing the numerator
`y` - a `double` representing the denominator
Returns:
a newly constructed `Complex` initialized to x/y
• #### divide

```public static Complex divide(double x,
Complex y)```
Returns the result of a `double` divided by a `Complex` object, x/y.
Parameters:
`x` - a `double` value
`y` - a `Complex` object representing the denominator
Returns:
a newly constructed `Complex` initialized to x/y
• #### doubleValue

`public double doubleValue()`
Returns the value of the real part as a `double`.
Specified by:
`doubleValue` in class `Number`
Returns:
a `double` representing the value of the real part of a `Complex` object
• #### equals

`public boolean equals(Complex z)`
Compares with another `Complex`.

Note: To be useful in hashtables this method considers two NaN `double` values to be equal. This is not according to IEEE specification.

Parameters:
`z` - a `Complex` object
Returns:
true if the real and imaginary parts of this object are equal to their counterparts in the argument; false, otherwise
• #### equals

`public boolean equals(Object obj)`
Compares this object against the specified object.

Note: To be useful in hashtables this method considers two NaN `double` values to be equal. This is not according to IEEE specification

Overrides:
`equals` in class `Object`
Parameters:
`obj` - the object to compare with
Returns:
true if the objects are the same; false otherwise
• #### exp

`public static Complex exp(Complex z)`
Returns the exponential of a `Complex` z, exp(z).

Specifically, if z = x+iy,
.
returns .
returns .
returns (where the signs of the real and imaginary parts of the result are unspecified).
returns (where the sign of the real part of the result is unspecified).
returns , for finite x.
returns , for finite y.
returns , for finite nonzero y.
returns (where the signs of the real and imaginary parts of the result are unspecified).
returns (where the sign of the real part of the result is unspecified).
returns .
returns , for all non-zero numbers y.
returns , for finite x.

Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the exponential of the argument
• #### floatValue

`public float floatValue()`
Returns the value of the real part as a float.
Specified by:
`floatValue` in class `Number`
Returns:
a float representing the value of the real part of a `Complex` object
• #### hashCode

`public int hashCode()`
Returns a hashcode for this `Complex`.
Overrides:
`hashCode` in class `Object`
Returns:
a hash code value for this object
• #### imag

`public double imag()`
Returns the imaginary part of a `Complex` object.
Returns:
a `double` representing the imaginary part of a `Complex` object, z
• #### imag

`public static double imag(Complex z)`
Returns the imaginary part of a `Complex` object.
Parameters:
`z` - a `Complex` object
Returns:
a `double` representing the imaginary part of the `Complex` object, z
• #### intValue

`public int intValue()`
Returns the value of the real part as an int.
Specified by:
`intValue` in class `Number`
Returns:
an int representing the value of the real part of a `Complex` object
• #### log

`public static Complex log(Complex z)`
Returns the logarithm of a `Complex` z, with a branch cut along the negative real axis.

Specifically, if z = x+iy,
.
returns .
returns .
returns .
returns .
returns , for finite x.
returns , for finite positive-signed y.
returns , for finite positive-signed y.
returns .
returns .
returns , for finite x.
returns , for finite y.
returns .

Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to the logarithm of the argument. Its imaginary part is in the interval .
• #### longValue

`public long longValue()`
Returns the value of the real part as a long.
Specified by:
`longValue` in class `Number`
Returns:
a long representing the value of the real part of a `Complex` object
• #### multiply

```public static Complex multiply(Complex x,
Complex y)```
Returns the product of two `Complex` objects, x * y.
Parameters:
`x` - a `Complex` object
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to
• #### multiply

```public static Complex multiply(Complex x,
double y)```
Returns the product of a `Complex` object and a `double`, x * y.
Parameters:
`x` - a `Complex` object
`y` - a `double` value
Returns:
a newly constructed `Complex` initialized to
• #### multiply

```public static Complex multiply(double x,
Complex y)```
Returns the product of a `double` and a `Complex` object, x * y.
Parameters:
`x` - a `double` value
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to
• #### multiplyImag

```public static Complex multiplyImag(Complex x,
double y)```
Returns the product of a `Complex` object and a pure imaginary `double`, x * iy.
Parameters:
`x` - a `Complex` object
`y` - a `double` value representing a pure imaginary
Returns:
a newly constructed `Complex` initialized to x * iy
• #### multiplyImag

```public static Complex multiplyImag(double x,
Complex y)```
Returns the product of a pure imaginary `double` and a `Complex` object, ix * y.
Parameters:
`x` - a `double` value representing a pure imaginary
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to .
• #### negate

`public static Complex negate(Complex z)`
Returns the negative of a `Complex` object, -z.
Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the negative of the `Complex` argument, z
• #### pow

```public static Complex pow(Complex x,
Complex y)```
Returns the `Complex` x raised to the `Complex` y power. The value of pow is defined in terms of the functions exp and log, by .
Parameters:
`x` - a `Complex` object
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to .
`exp(com.imsl.math.Complex)`, `log(com.imsl.math.Complex)`
• #### pow

```public 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.
Parameters:
`z` - a `Complex` object
`x` - a `double` value
Returns:
a newly constructed `Complex` initialized to z to the power x
• #### real

`public double real()`
Returns the real part of a `Complex` object.
Returns:
a `double` representing the real part of a `Complex` object, z
• #### real

`public static double real(Complex z)`
Returns the real part of a `Complex` object.
Parameters:
`z` - a `Complex` object
Returns:
a `double` representing the real part of the `Complex` object, z
• #### shortValue

`public short shortValue()`
Returns the value of the real part as a short.
Overrides:
`shortValue` in class `Number`
Returns:
a short representing the value of the real part of a `Complex` object
• #### sin

`public static Complex sin(Complex z)`
Returns the sine of a `Complex`. The value of sin is defined in terms of the function sinh, by .
Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the sine of the argument
`sinh(com.imsl.math.Complex)`
• #### sinh

`public static Complex sinh(Complex z)`
Returns the hyperbolic sine of a `Complex`.

If z = x+iy,
and sinh is odd.
returns .
returns (where the sign of the real part of the result is unspecified).
returns .
returns (where the sign of the real part of the result is unspecified).
returns , for positive finite y.
returns , for positive finite x.
returns (where the sign of the real part of the result is unspecified).
returns (where the sign of the real part of the result is unspecified).
returns , for finite nonzero x.
returns .
returns , for all nonzero numbers y.
returns .

Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the hyperbolic sine of the argument
• #### sqrt

`public static Complex sqrt(Complex z)`
Returns the square root of a `Complex`, with a branch cut along the negative real axis.

Specifically, if z = x+iy,
.
returns .
returns , for finite positive-signed y.
returns , for finite positive-signed y.
returns , for all x (including NaN).
returns (where the sign of the imaginary part of the result is unspecified).
returns .
returns and optionally raises the invalid exception, for finite x.
returns and optionally raises the invalid exception, for finite y.
returns .

Parameters:
`z` - a `Complex` object
Returns:
A newly constructed `Complex` initialized to square root of z.
• #### subtract

```public static Complex subtract(Complex x,
Complex y)```
Returns the difference of two `Complex` objects, x-y.
Parameters:
`x` - a `Complex` object
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to x-y
• #### subtract

```public static Complex subtract(Complex x,
double y)```
Returns the difference of a `Complex` object and a `double`, x-y.
Parameters:
`x` - a `Complex` object
`y` - a `double` value
Returns:
a newly constructed `Complex` initialized to x-y
• #### subtract

```public static Complex subtract(double x,
Complex y)```
Returns the difference of a `double` and a `Complex` object, x-y.
Parameters:
`x` - a `double` value
`y` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to x-y
• #### tan

`public static Complex tan(Complex z)`
Returns the tangent of a `Complex`. The value of tan is defined in terms of the function tanh, by .
Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the tangent of the argument
`tanh(com.imsl.math.Complex)`
• #### tanh

`public static Complex tanh(Complex z)`
Returns the hyperbolic tanh of a `Complex`.

If z = x+iy,
and tanh is odd.
returns .
returns , for all positive-signed numbers y.
returns , for finite x.
returns (where the sign of the imaginary part of the result is unspecified).
returns .
returns , for all nonzero numbers y.
returns , for finite x.
returns .

Parameters:
`z` - a `Complex` object
Returns:
a newly constructed `Complex` initialized to the hyperbolic tangent of the argument
• #### toString

`public String toString()`
Returns a `String` representation for the specified `Complex`.
Overrides:
`toString` in class `Object`
Returns:
a `String` representation for this object
• #### valueOf

```public static Complex valueOf(String s)
throws NumberFormatException```
Parses a `String` into a `Complex`.
Parameters:
`s` - the `String` to be parsed
Returns:
a newly constructed `Complex` initialized to the value represented by the `String` argument
Throws:
`NumberFormatException` - if the string does not contain a parsable `Complex` number
`NullPointerException` - if the input argument is null
JMSLTM Numerical Library 7.2.0