std::tanh(std::complex)
From cppreference.com
| Defined in header <complex>
|
||
| template< class T > complex<T> tanh( const complex<T>& z ); |
(since C++11) | |
Computes complex hyperbolic tangent of a complex value z.
Contents |
[edit] Parameters
| z | - | complex value |
[edit] Return value
If no errors occur, complex hyperbolic tangent of z is returned.
[edit] Error handling and special values
Errors are reported consistent with math_errhandling.
If the implementation supports IEEE floating-point arithmetic,
- std::tanh(std::conj(z)) == std::conj(std::tanh(z)).
- std::tanh(-z) == -std::tanh(z).
- If z is
(+0,+0), the result is(+0,+0). - If z is
(x,+∞)(for any[1] finite x), the result is(NaN,NaN)and FE_INVALID is raised. - If z is
(x,NaN)(for any[2] finite x), the result is(NaN,NaN)and FE_INVALID may be raised. - If z is
(+∞,y)(for any finite positive y), the result is(1,+0). - If z is
(+∞,+∞), the result is(1,±0)(the sign of the imaginary part is unspecified). - If z is
(+∞,NaN), the result is(1,±0)(the sign of the imaginary part is unspecified). - If z is
(NaN,+0), the result is(NaN,+0). - If z is
(NaN,y)(for any non-zero y), the result is(NaN,NaN)and FE_INVALID may be raised. - If z is
(NaN,NaN), the result is(NaN,NaN).
- ↑ per C11 DR471, this only holds for non-zero x. If
zis(0,∞), the result should be(0,NaN). - ↑ per C11 DR471, this only holds for non-zero x. If
zis(0,NaN), the result should be(0,NaN).