TANHaccepts either aCOMPLEXorREALargument and returns a value of the same type. The argument must be specified in radians, regardless of the current trigonometric mode. The real and imaginary parts ofTANH(Z) are calculated (using real arithmetic) as
REAL(TANH(Z)) = SINH(2*REAL(Z))/D
IMAG(TANH(Z)) = SIN(2*IMAG(Z))/D
Where:
D = COSH(2*REAL(Z))+COS(2*IMAG(Z))
The domain ofTANHincludes all points exceptCMPLX(0,PI/2+PI*K), where K can be any integer. However, intermediate values generated during the calculation of the function can cause over or underflow errors for very large or small values of Z.