v?Modf

Computes a truncated integer value and the remaining fraction part for each vector element.

Syntax

Fortran:

call vsmodf( n, a, y, z )

call vdmodf( n, a, y, z )

C:

vsModf( n, a, y, z );

vdModf( n, a, y, z );

Include Files

The FORTRAN 77 interfaces are specified in the mkl_vml.f77 include file, the Fortran 90 interfaces are specified in the mkl_vml.f90 include file, and the C interfaces are specified in the mkl_vml_functions.h include file.

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 vsmodf

DOUBLE PRECISION for vdmodf

Fortran 90: REAL, INTENT(IN) for vsmodf

DOUBLE PRECISION, INTENT(IN) for vdmodf

C: const float* for vsModf

const double* for vdModf

FORTRAN: Array, 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 SetMode for possible values and their description.

Output Parameters

Name

Type

Description

y, z

FORTRAN 77: REAL for vsmodf

DOUBLE PRECISION for vdmodf

Fortran 90: REAL, INTENT(OUT) for vsmodf

DOUBLE PRECISION, INTENT(OUT) for vdmodf

C: float* for vsModf

double* for vdModf

FORTRAN: Array, specifies the output vector y and z.

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

Description

The function computes a truncated integer value and the remaining fraction part for each vector element.

Halfway values, such as 0.5, -1.5, are rounded off towards even values. An inexact result exception is raised for each changed value.

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

Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.