complex - Associated Globals

abs
double abs(complex)

Returns the absolute value or magnitude of its argument. The absolute value of a complex value (a, b) is the positive square root of a2 + b2.

This is supported on OS/400 z/OS

abs
double abs(const complex&)

Returns the absolute value or magnitude of its argument. The absolute value of a complex value (a, b) is the positive square root of a2 + b2.

This is supported on AIX

arg
double arg(complex)

Returns the angle (in radians) of the polar representation of its argument. If the argument is equal to the complex number (a, b), the angle returned is the angle in radians on the complex plane between the real axis and the vector (a, b). The return value has a range of -pi to pi.

This is supported on OS/400 z/OS

arg
double arg(const complex&)

Returns the angle (in radians) of the polar representation of its argument. If the argument is equal to the complex number (a, b), the angle returned is the angle in radians on the complex plane between the real axis and the vector (a, b). The return value has a range of -pi to pi.

This is supported on AIX

conj
complex conj(complex)

Returns the complex value equal to (a, -b) if the input argument is equal to (a, b).

This is supported on OS/400 z/OS

conj
inline complex conj(const complex&)

Returns the complex value equal to (a, -b) if the input argument is equal to (a, b).

This is supported on AIX

cos
complex cos(complex)

Returns the cosine of the complex argument.

This is supported on OS/400 z/OS

cos
complex cos(const complex&)

Returns the cosine of the complex argument.

This is supported on AIX

cosh
complex cosh(complex)

Returns the hyperbolic cosine of the complex argument.

This is supported on OS/400 z/OS

cosh
complex cosh(const complex&)

Returns the hyperbolic cosine of the complex argument.

This is supported on AIX

exp
complex exp(complex)

Returns the complex value equal to e to the power of x where x is the argument.

This is supported on OS/400 z/OS

exp
complex exp(const complex&)

Returns the complex value equal to e to the power of x where x is the argument.

This is supported on AIX

imag
double imag(const complex&)

Extracts the imaginary part of the complex number provided as the argument.

This is supported on OS/400 z/OS

imag
inline double imag(const complex&)

Extracts the imaginary part of the complex number provided as the argument.

This is supported on AIX

log
complex log(complex)

Returns the natural logarithm of the argument x.

This is supported on AIX

log
complex log(complex)

Returns the natural logarithm of the argument x.

This is supported on OS/400 z/OS

norm
double norm(complex)

Returns the square of the magnitude of its argument. If the argument x is equal to the complex number (a, b), norm() returns the value a2 + b2.

norm() is faster than abs(), but it is more likely to cause overflow errors.

This is supported on OS/400 z/OS

norm
double norm(const complex&)

Returns the square of the magnitude of its argument. If the argument x is equal to the complex number (a, b), norm() returns the value a2 + b2.

norm() is faster than abs(), but it is more likely to cause overflow errors.

This is supported on AIX

operator !=
int operator !=(complex, complex)

The inequality operator "!=" returns a nonzero value if x does not equal y. This operator tests for inequality by testing that the two real components are not equal and that the two imaginary components are not equal.

Because both components are double values, the inequality operator returns false only when both the real and imaginary components of the two values are identical. If you want an inequality operator that can test for an absolute difference within a certain tolerance between the two pairs of corresponding components, you can use a function such as the is_not_equal function.

This is supported on OS/400 z/OS

operator !=
inline int operator !=(const complex&, const complex&)

The inequality operator "!=" returns a nonzero value if x does not equal y. This operator tests for inequality by testing that the two real components are not equal and that the two imaginary components are not equal.

Because both components are double values, the inequality operator returns false only when both the real and imaginary components of the two values are identical. If you want an inequality operator that can test for an absolute difference within a certain tolerance between the two pairs of corresponding components, you can use a function such as the is_not_equal function.

This is supported on AIX

operator *
complex operator *(complex, complex)

The multiplication operator returns the product of x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on OS/400 z/OS

operator *
complex operator *(const complex&, double)

The multiplication operator returns the product of x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator *
complex operator *(const complex&, const complex&)

The multiplication operator returns the product of x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator +
complex operator +(complex, complex)

The addition operator returns the sum of x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on OS/400 z/OS

operator +
inline complex operator +(const complex&, const complex&)

The addition operator returns the sum of x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator -
inline complex operator -(const complex&, const complex&)

The subtraction operator returns the difference between x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator -
complex operator -(complex, complex)

The subtraction operator returns the difference between x and y.

This operator has the same precedence as the corresponding real operator.

This is supported on OS/400 z/OS

operator -
inline complex operator -(const complex&)

The negation operator returns (-a, -b) when its argument is (a, b).

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator -
complex operator -(complex)

The negation operator returns (-a, -b) when its argument is (a, b).

This operator has the same precedence as the corresponding real operator.

This is supported on OS/400 z/OS

operator /
complex operator /(const complex&, double)

The division operator returns the quotient of x divided by y.

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator /
complex operator /(const complex&, const complex&)

The division operator returns the quotient of x divided by y.

This operator has the same precedence as the corresponding real operator.

This is supported on AIX

operator /
complex operator /(complex, complex)

The division operator returns the quotient of x divided by y.

This operator has the same precedence as the corresponding real operator.

This is supported on OS/400 z/OS

operator ==
int operator ==(complex, complex)

The equality operator "==" returns a nonzero value if x equals y. This operator tests for equality by testing that the two real components are equal and that the two imaginary components are equal.

Because both components are double values, the equality operator tests for an exact match between the two sets of values. If you want an equality operator that can test for an absolute difference within a certain tolerance between the two pairs of corresponding components, you can use a function such as the isequal function.

This is supported on OS/400 z/OS

operator ==
inline int operator ==(const complex&, const complex&)

The equality operator "==" returns a nonzero value if x equals y. This operator tests for equality by testing that the two real components are equal and that the two imaginary components are equal.

Because both components are double values, the equality operator tests for an exact match between the two sets of values. If you want an equality operator that can test for an absolute difference within a certain tolerance between the two pairs of corresponding components, you can use a function such as the isequal function.

This is supported on AIX

polar
complex polar(double, double = 0)

Returns the standard complex representation of the complex number that has a polar representation (a, b).

This is supported on AIX OS/400 z/OS

pow
complex pow(complex, double)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on OS/400 z/OS

pow
complex pow(double, complex)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on OS/400 z/OS

pow
complex pow(complex, complex)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on OS/400 z/OS

pow
complex pow(complex, int)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on OS/400 z/OS

pow
complex pow(const complex&, int)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on AIX

pow
complex pow(const complex&, double)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on AIX

pow
complex pow(const complex&, const complex&)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on AIX

pow
complex pow(double, const complex&)

Returns the complex value xy, where x is the first argument and y is the second argument.

This is supported on AIX

real
double real(const complex&)

Extracts the real part of the complex number provided as the argument.

This is supported on OS/400 z/OS

real
inline double real(const complex&)

Extracts the real part of the complex number provided as the argument.

This is supported on AIX

sin
complex sin(const complex&)

Returns the sine of the complex argument.

This is supported on AIX

sin
complex sin(complex)

Returns the sine of the complex argument.

This is supported on OS/400 z/OS

sinh
complex sinh(const complex&)

Returns the hyperbolic sine of the complex argument.

This is supported on AIX

sinh
complex sinh(complex)

Returns the hyperbolic sine of the complex argument.

This is supported on OS/400 z/OS

sqrt
complex sqrt(complex)

Returns the square root of its argument. If c and d are real values, then every complex number (a, b), where:

   a = c2 - d2
   b = 2cd

has two square roots:

   (c, d)
   (-c, -d)

sqrt() returns the square root that has a positive real part, that is, the square root that is contained in the first or fourth quadrants of the complex plane.

This is supported on AIX OS/400 z/OS