C++ complex asinh

The C++ complex ‘asinh’ function compute the arc hyperbolic sine of the complex number.The declaration of the function is given below.

template<class T> complex<T> asinh(const complex<T>& x);

x – A complex number whose arc hyperbolic sine is to be computed.

Return type
complex<T> -The complex arc hyperbolic sine of ‘x’.

Some points to note:

i)The arc hyperbolic sine is computed using the formula.

C++ complex asinh

ii)The asinh functions compute the complex arc hyperbolic sine of x,with branch cuts outside the interval [−i , +i] along the imaginary axis.

iii)The ‘asinh’ returns a complex whose value is in the range of a half-strip of non-negative values along the real axis and in the interval [−iπ , +iπ] along the imaginary axis.

Code example

complex< double > c1(900 , 0.90 ) , c2( 23.5 , 7.123) ;

cout<< asinh( c1 +c2 ) ;




The c1+c2 is (923.5,8.023),to find the asinh(923.5,8.023 ) we use the equation given below,

ln[ (923.5+i8.023) ± √((2.34 + i6.78)2 + 1) ]

The ‘ln’ is the natural logarithm which is also written as ‘loge‘.Reducing the equation to the complex number form we get “7.52136 + i0.00868738” as the resultant complex value.

Link :C++ cmath log function

*Side Note

Some cases of asinh function,

  ➥asinh( conj(z) )=conj( asinh(z) ).

  ➥asinh(+0 + i0) returns 0+i0.

  ➥asinh(±0 + iNaN) ,returns (±NaN , iNaN).

  ➥asinh(x + i∞) returns +∞ + iπ/2 for positive-signed finite ‘x’.

  ➥asinh(x + iNaN) returns NaN+iNaN and optionally raises the invalid floating-point exception, for finite ‘x’.

  ➥asinh(+∞ + iy) returns +∞ +i0 for positive-signed finite ‘y’.

  ➥asinh(+∞ + i∞ ) returns +∞ + iπ/4

  ➥asinh(+∞ +iNaN) returns +∞ +iNaN.

  ➥asinh(NaN + i0) returns NaN+i0.

  ➥asinh(NaN + iy) returns NaN+iNaN and optionally raises the “invalid” floating-point exception, for finite nonzero ‘y’.

  ➥asinh(NaN + i∞) returns ±∞ +iNaN (where the sign of the real part of the resultis unspecified)

  ➥asinh(NaN + iNaN) returns NaN+iNaN.

Link :C++ complex conj