tan

constexpr Complex tan(const Complex &z) noexcept

Returns the complex tan [1] of a complex number \(z\).

Parameters

const Complex &z

A complex number.

Returns

type Complex

A complex number.

The tan function of a complex number is defined as:

\[\tan z = \frac{\sin z}{\cos z}\]

Example

Complex z = 3 + 4_j;
std::cout << tan(z) << "\n";

Output:

-0.000187346 + 0.999356j

References