Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
v?Tanh
vsTanh vdTanh vcTanh vzTanh vmsTanh vmdTanh vmcTanh vmzTanh Computes hyperbolic tangent of vector elements.
Syntax
call vstanh ( n , a , y )
call vstanhi(n, a, inca, y, incy)
call vmstanh ( n , a , y , mode )
call vmstanhi(n, a, inca, y, incy, mode)
call vdtanh ( n , a , y )
call vdtanhi(n, a, inca, y, incy)
call vmdtanh ( n , a , y , mode )
call vmdtanhi(n, a, inca, y, incy, mode)
call vctanh ( n , a , y )
call vctanhi(n, a, inca, y, incy)
call vmctanh ( n , a , y , mode )
call vmctanhi(n, a, inca, y, incy, mode)
call vztanh ( n , a , y )
call vztanhi(n, a, inca, y, incy)
call vmztanh ( n , a , y , mode )
call vmztanhi(n, a, inca, y, incy, mode)
Include Files
mkl_vml.f90
Input Parameters
Name |
Type |
Description |
|---|---|---|
n |
Specifies the number of elements to be calculated. |
|
a |
Fortran 77: DOUBLE PRECISION for vdtanh , vmdtanhFortran 77: COMPLEX for vctanh , vmctanhFortran 77: DOUBLE COMPLEX for vztanh , vmztanhFortran 90: REAL , INTENT(IN) for vstanh , vmstanhFortran 90: DOUBLE PRECISION , INTENT(IN) for vdtanh , vmdtanhFortran 90: COMPLEX , INTENT(IN) for vctanh , vmctanhFortran 90: DOUBLE COMPLEX , INTENT(IN) for vztanh , vmztanh |
Array that specifies the input vector a . |
inca , incy |
INTEGER, INTENT(IN) |
Specifies increments for the elements of a and y . |
mode |
INTEGER(KIND=8) , INTENT(IN) |
Overrides global VM mode setting for this function call. See vmlSetMode (Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.) for possible values and their description. |
Output Parameters
Name |
Type |
Description |
|---|---|---|
y |
Fortran 77: DOUBLE PRECISION for vdtanh , vmdtanhFortran 77: COMPLEX for vctanh , vmctanhFortran 77: DOUBLE COMPLEX for vztanh , vmztanhFortran 90: REAL , INTENT(OUT) for vstanh , vmstanhFortran 90: DOUBLE PRECISION , INTENT(OUT) for vdtanh , vmdtanhFortran 90: COMPLEX , INTENT(OUT) for vctanh , vmctanhFortran 90: DOUBLE COMPLEX , INTENT(OUT) for vztanh , vmztanh |
Array that specifies the output vector y . |
Description
The v?Tanh function computes hyperbolic tangent of vector elements.
Special Values for Real Function v?Tanh(x)
Argument |
Result |
Exception |
|---|---|---|
+0 |
+0 |
|
-0 |
-0 |
|
|
+1 |
|
|
-1 |
|
QNAN |
QNAN |
|
SNAN |
QNAN |
INVALID |
See Special Value Notations for the conventions used in the table below.
Special Values for Complex Function v?Tanh(z)
RE(z) i · IM(z) |
|
-X |
-0 |
+0 |
+X |
|
NAN |
|---|---|---|---|---|---|---|---|
+i · ∞ |
-1+i · 0 |
QNAN+i · QNAN INVALID |
QNAN+i · QNAN INVALID |
QNAN+i · QNAN INVALID |
QNAN+i · QNAN INVALID |
+1+i · 0 |
QNAN+i · QNAN |
+i · Y |
-1+i · 0 · Tan(Y) |
+1+i · 0 · Tan(Y) |
QNAN+i · QNAN |
||||
+i · 0 |
-1+i · 0 |
-0+i · 0 |
+0+i · 0 |
+1+i · 0 |
QNAN+i · 0 |
||
-i · 0 |
-1-i · 0 |
-0-i · 0 |
+0-i · 0 |
+1-i · 0 |
QNAN-i · 0 |
||
-i · Y |
-1+i · 0 · Tan(Y) |
+1+i · 0 · Tan(Y) |
QNAN+i · QNAN |
||||
-i · ∞ |
-1-i · 0 |
QNAN+i · QNAN INVALID |
QNAN+i · QNAN INVALID |
QNAN+i · QNAN INVALID |
QNAN+i · QNAN INVALID |
+1-i · 0 |
QNAN+i · QNAN |
+i · NAN |
-1+i · 0 |
QNAN+i · QNAN |
QNAN+i · QNAN |
QNAN+i · QNAN |
QNAN+i · QNAN |
+1+i · 0 |
QNAN+i · QNAN |
Notes:
raises INVALID exception when real or imaginary part of the argument is SNAN
\(Tanh(CONJ(z))=CONJ(Tanh(z))\)
\(Tanh(-z)=-Tanh(z)\) .