template< class T >
complex<T> tanh( const complex<T>& z );
Computes complex hyperbolic tangent of a complex value z.
[edit] Parameters [edit] Return valueIf no errors occur, complex hyperbolic tangent of z is returned.
[edit] Error handling and special valuesErrors are reported consistent with math_errhandling.
If the implementation supports IEEE floating-point arithmetic,
(+0,+0)
, the result is (+0,+0)
.(x,+â)
(for any[1] finite x), the result is (NaN,NaN)
and FE_INVALID is raised.(x,NaN)
(for any[2] finite x), the result is (NaN,NaN)
and FE_INVALID may be raised.(+â,y)
(for any finite positive y), the result is (1,+0)
.(+â,+â)
, the result is (1,±0)
(the sign of the imaginary part is unspecified).(+â,NaN)
, the result is (1,±0)
(the sign of the imaginary part is unspecified).(NaN,+0)
, the result is (NaN,+0)
.(NaN,y)
(for any non-zero y), the result is (NaN,NaN)
and FE_INVALID may be raised.(NaN,NaN)
, the result is (NaN,NaN)
.z
is (0,â)
, the result should be (0,NaN)
.z
is (0,NaN)
, the result should be (0,NaN)
.Mathematical definition of hyperbolic tangent is
tanh z =.
Hyperbolic tangent is an analytical function on the complex plane and has no branch cuts. It is periodic with respect to the imaginary component, with period πi, and has poles of the first order along the imaginary line, at coordinates (0, Ï(1/2 + n)). However no common floating-point representation is able to represent Ï/2 exactly, thus there is no value of the argument for which a pole error occurs.
[edit] ExampleOutput:
tanh(1.000000,0.000000) = (0.761594,0.000000) (tanh(1) = 0.761594) tanh(0.000000,1.000000) = (0.000000,1.557408) ( tan(1) = 1.557408)[edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4