tanh

constexpr Complex tanh(const Complex &z) noexcept

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

Parameters

const Complex &z

A complex number.

Returns

type Complex

A complex number.

The tanh function of a complex number is defined as:

\[\tanh z = \frac{\sinh z}{\cosh z}\]

Example

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

Output:

1.00071 + 0.00490826j

References