Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 11/07/2023
Public

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

Document Table of Contents

v?Ln

Computes natural logarithm of vector elements.

Syntax

call vsln( n, a, y )

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

call vmsln( n, a, y, mode )

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

call vdln( n, a, y )

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

call vmdln( n, a, y, mode )

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

call vcln( n, a, y )

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

call vmcln( n, a, y, mode )

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

call vzln( n, a, y )

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

call vmzln( n, a, y, mode )

call vmzlni(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 vdln, vmdln

COMPLEX for vcln, vmcln

DOUBLE COMPLEX for vzln, vmzln

REAL, INTENT(IN) for vsln, vmsln

DOUBLE PRECISION, INTENT(IN) for vdln, vmdln

COMPLEX, INTENT(IN) for vcln, vmcln

DOUBLE COMPLEX, INTENT(IN) for vzln, vmzln

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 vdln, vmdln

COMPLEX for vcln, vmcln

DOUBLE COMPLEX for vzln, vmzln

REAL, INTENT(OUT) for vsln, vmsln

DOUBLE PRECISION, INTENT(OUT) for vdln, vmdln

COMPLEX, INTENT(OUT) for vcln, vmcln

DOUBLE COMPLEX, INTENT(OUT) for vzln, vmzln

Array that specifies the output vector y.

Description

The v?Ln function computes natural logarithm of vector elements.

Special Values for Real Function v?Ln(x)
Argument Result VM Error Status Exception
+1 +0    
X < +0 QNAN VML_STATUS_ERRDOM INVALID
+0 - VML_STATUS_SING ZERODIVIDE
-0 - VML_STATUS_SING ZERODIVIDE
- QNAN VML_STATUS_ERRDOM INVALID
+ +    
QNAN QNAN    
SNAN QNAN   INVALID

See Special Value Notations for the conventions used in the table below.

Special Values for Complex Function v?Ln(z)

RE(z)

i·IM(z)

-

 

-X

 

-0

 

+0

 

+X

 

+

 

NAN

 

+i· ++i·π/2 ++i·π/2 ++i·π/2 ++i·π/2 ++i·π/4

++i·QNAN

+i·Y ++i·π         ++i·0

QNAN+i·QNAN

INVALID

+i·0 ++i·π   -+i·π ZERODIVIDE -+i·0 ZERODIVIDE   ++i·0

QNAN+i·QNAN

INVALID

-i·0 +-i·π   --i·π ZERODIVIDE --i·0 ZERODIVIDE   +-i·0

QNAN+i·QNAN

INVALID

-i·Y +-i·π         +-i·0

QNAN+i·QNAN

INVALID

-i· +-i·π/2 +-i·π/2 +-i·π/2 +-i·π/2 +-i·π/4 ++i·QNAN
+i·NAN

++i·QNAN

QNAN+i·QNAN

INVALID

QNAN+i·QNAN

INVALID

QNAN+i·QNAN

INVALID

QNAN+i·QNAN

INVALID

++i·QNAN

QNAN+i·QNAN

INVALID

Notes:

  • raises INVALID exception when real or imaginary part of the argument is SNAN