v?Tan

Computes tangent of vector elements.

Syntax

FORTRAN:

call vstan( n, a, y )

call vmstan( n, a, y, mode )

call vdtan( n, a, y )

call vmdtan( n, a, y, mode )

call vctan( n, a, y )

call vmctan( n, a, y, mode )

call vztan( n, a, y )

call vmztan( n, a, y, mode )

C:

vsTan( n, a, y );

vmsTan( n, a, y, mode );

vdTan( n, a, y );

vmdTan( n, a, y, mode );

vcTan( n, a, y );

vmcTan( n, a, y, mode );

vzTan( n, a, y );

vmzTan( n, a, y, mode );

Include Files

Input Parameters

Name

Type

Description

n

FORTRAN 77: INTEGER

Fortran 90: INTEGER, INTENT(IN)

C: const int

Specifies the number of elements to be calculated.

a

FORTRAN 77: REAL for vstan, vmstan

DOUBLE PRECISION for vdtan, vmdtan

COMPLEX for vctan, vmctan

DOUBLE COMPLEX for vztan, vmztan

Fortran 90: REAL, INTENT(IN) for vstan, vmstan

DOUBLE PRECISION, INTENT(IN) for vdtan, vmdtan

COMPLEX, INTENT(IN) for vctan, vmctan

DOUBLE COMPLEX, INTENT(IN) for vztan, vmztan

C: const float* for vsTan, vmsTan

const double* for vdTan, vmdTan

const MKL_Complex8* for vcTan, vmcTan

const MKL_Complex16* for vzTan, vmzTan

FORTRAN: Array that specifies the input vector a.

C: Pointer to an array that contains the input vector a.

mode

FORTRAN 77: INTEGER*8

Fortran 90: INTEGER(KIND=8), INTENT(IN)

C: const MKL_INT64

Overrides global VML mode setting for this function call. See vmlSetMode for possible values and their description.

Output Parameters

Name

Type

Description

y

FORTRAN 77: REAL for vstan, vmstan

DOUBLE PRECISION for vdtan, vmdtan

COMPLEX for vctan, vmctan

DOUBLE COMPLEX for vztan, vmztan

Fortran 90: REAL, INTENT(OUT) for vstan, vmstan

DOUBLE PRECISION, INTENT(OUT) for vdtan, vmdtan

COMPLEX, INTENT(OUT) for vctan, vmctan

DOUBLE COMPLEX, INTENT(OUT) for vztan, vmztan

C: float* for vsTan, vmsTan

double* for vdTan, vmdTan

MKL_Complex8* for vcTan, vmcTan

MKL_Complex16* for vzTan, vmzTan

FORTRAN: Array that specifies the output vector y.

C: Pointer to an array that contains the output vector y.

Description

The v?Tan function computes tangent of vector elements.

Note that arguments abs(a[i]) ≤ 213 and abs(a[i]) ≤ 216 for single and double precisions respectively are called fast computational path. These are trigigonometric function arguments for which VML provides the best possible performance. Avoid arguments that do not belong to the fast computational path in the VML High Accuracy (HA) and Low Accuracy (LA) functions. Alternatively, you can use VML Enhanced Performance (EP) functions that are fast on the entire function domain. However, these functions provide less accuracy.

Special Values for Real Function v?Tan(x)
Argument Result VML Error Status Exception
+0 +0    
-0 -0    
+ QNAN VML_STATUS_ERRDOM INVALID
- QNAN VML_STATUS_ERRDOM INVALID
QNAN QNAN    
SNAN QNAN   INVALID

Specifications for special values of the complex functions are defined according to the following formula

Tan(z) = -i*Tanh(i*z).


Submit feedback on this help topic