# C complex.h casinh,casinhf and casinhl

The C <complex.h> casinh,casinhf and casinhl functions compute the arc hyperbolic sine of the complex number.The declaration of the function is given below.

1 double complex casinh(double complex z);
2 float complex casinhf(float complex z);
3 long double complex casinhl(long double complex z);

All the three functions compute the same value,the only difference between them is in their return type:

i)The ‘casinh’ return the arc sine as double complex type.
ii)The ‘casinhf’ return the arc sine as float complex type and
iii)The ‘casinhl’ return the arc sine as long double complex type.

Some points to note:

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

ii)The 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.

#### double complex cacosh(double complex z);

Parameters:
z – A complex number whose arc hyperbolic sine is to be computed.

Return type
double complex -The complex arc hyperbolic sine of ‘z’ return as double type.

Code example

double complex c1=104.500 +I*1.3007 , c2 ;

c2=casinh( c1 ) ;

printf( “Real part of c2=%lf”, creal(c2) ) ;
printf( “\nImaginary part of c2=%lf”, cimag(c2) ) ;

Output,

Real part of c2=5.342435
Imaginary part of c2=0.012446

#### float complex cacoshf(float complex z);

This function compute the arc hyperbolic sine of complex number and return it as float type.

Parameters:
z – A complex number whose arc hyperbolic sine is to be computed.

Return type
float complex -The complex arc hyperbolic sine of ‘z’ return as float type.

Code example

double complex c1=104.500 +I*1.3007 , c2 ;

c2=casinhf( c1 ) ; //may result in loss of precision

printf( “Real part of c2=%lf”, creal(c2) ) ;
printf( “\nImaginary part of c2=%lf”, cimag(c2) ) ;

Output,

Real part of c2=5.342435
Imaginary part of c2=0.012446

#### long double complex cacoshl(long double complex z);

This function compute the arc hyperbolic sine of complex number and return it as long double type.

Parameters:
z – A complex number whose arc hyperbolic sine is to be computed.

Return type
long double complex -The complex arc hyperbolic sine of ‘z’ return as long double type.

Code example

long double complex c1=104.500 +I*1.3007 , c2 ;

c2=casinhl( c1 ) ; //may result in loss of precision

printf( “Real part of c2=%Lf”, creall(c2) ) ;
printf( “\nImaginary part of c2=%Lf”, cimagl(c2) ) ;

Output,

Real part of c2=5.342435
Imaginary part of c2=0.012446

*Side Note

Some cases of casinh function (also holds true for casinhf and casinhl),

➥casinh( conj(z) )=conj( casinh(z) ).

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

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

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

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

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

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

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

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

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

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

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