Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

v?Abs

Computes absolute value of vector elements.

Syntax

call vsabs( n, a, y )

call vsabsi(n, a, inca, y, incy)

call vmsabs( n, a, y, mode )

call vmsabsi(n, a, inca, y, incy, mode)

call vdabs( n, a, y )

call vdabsi(n, a, inca, y, incy)

call vmdabs( n, a, y, mode )

call vmdabsi(n, a, inca, y, incy, mode)

call vcabs( n, a, y )

call vcabsi(n, a, inca, y, incy)

call vmcabs( n, a, y, mode )

call vmcabsi(n, a, inca, y, incy, mode)

call vzabs( n, a, y )

call vzabsi(n, a, inca, y, incy)

call vmzabs( n, a, y, mode )

call vmzabsi(n, a, inca, y, incy, mode)

Include Files

  • mkl_vml.f90

Input Parameters

Name

Type

Description

n

INTEGER, INTENT(IN)

Specifies the number of elements to be calculated.

a

DOUBLE PRECISION for vdabs, vmdabs

COMPLEX for vcabs, vmcabs

DOUBLE COMPLEX for vzabs, vmzabs

REAL, INTENT(IN) for vsabs, vmsabs

DOUBLE PRECISION, INTENT(IN) for vdabs, vmdabs

COMPLEX, INTENT(IN) for vcabs, vmcabs

DOUBLE COMPLEX, INTENT(IN) for vzabs, vmzabs

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 for possible values and their description.

Output Parameters

Name

Type

Description

y

DOUBLE PRECISION for vdabs, vmdabs, vzabs, vmzabs

REAL, INTENT(OUT) for vsabs, vmsabs, vcabs, vmcabs

DOUBLE PRECISION, INTENT(OUT) for vdabs, vmdabs, vzabs, vmzabs

Array that specifies the output vector y.

Description

The v?Abs function computes an absolute value of vector elements.

Special Values for Real Function v?Abs(x)
Argument Result Exception
+0 +0  
-0 +0  
+ +  
- +  
QNAN QNAN  
SNAN QNAN INVALID

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

Abs(z) = Hypot(RE(z),IM(z)).