Developer Reference for Intel® oneAPI Math Kernel Library for C
A newer version of this document is available. Customers should click here to go to the newest version.
v?Exp
Computes an exponential of vector elements.
Syntax
vhExp( n, a, y );
vhExpI(n, a, inca, y, incy);
vmhExp( n, a, y, mode );
vmhExpI(n, a, inca, y, incy, mode);
vsExp( n, a, y );
vsExpI(n, a, inca, y, incy);
vmsExp( n, a, y, mode );
vmsExpI(n, a, inca, y, incy, mode);
vdExp( n, a, y );
vdExpI(n, a, inca, y, incy);
vmdExp( n, a, y, mode );
vmdExpI(n, a, inca, y, incy, mode);
vcExp( n, a, y );
vcExpI(n, a, inca, y, incy);
vmcExp( n, a, y, mode );
vmcExpI(n, a, inca, y, incy, mode);
vzExp( n, a, y );
vzExpI(n, a, inca, y, incy);
vmzExp( n, a, y, mode );
vmzExpI(n, a, inca, y, incy, mode);
Include Files
- mkl.h
 
Input Parameters
Name  |  
      Type  |  
      Description  |  
     
|---|---|---|
n  |  
      const MKL_INT  |  
      Specifies the number of elements to be calculated.  |  
     
a  |  
      const _Float16* for vhExp, vmhExp const float* for vsExp, vmsExp const double* for vdExp, vmdExp const MKL_Complex8* for vcExp, vmcExp const MKL_Complex16* for vzExp, vmzExp  |  
      Pointer to an array that contains the input vector a.  |  
     
inca, incy  |  
      const MKL_INT  |  
      Specifies increments for the elements of a and y.  |  
     
mode  |  
      const MKL_INT64  |  
      Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description.  |  
     
| Data Type | Threshold Limitations on Input Parameters | 
|---|---|
| single precision | a[i] < Ln( FLT_MAX ) | 
| double precision | a[i] < Ln( DBL_MAX ) | 
Precision overflow thresholds for the complex v?Exp function are beyond the scope of this document.
Output Parameters
Name  |  
      Type  |  
      Description  |  
     
|---|---|---|
y  |  
      _Float16* for vhExp, vmhExp float* for vsExp, vmsExp double* for vdExp, vmdExp MKL_Complex8* for vcExp, vmcExp MKL_Complex16* for vzExp, vmzExp  |  
      Pointer to an array that contains the output vector y.  |  
     
Description
The v?Exp function computes an exponential of vector elements.
| Argument | Result | VM Error Status | Exception | 
|---|---|---|---|
| +0 | +1 | ||
| -0 | +1 | ||
| X > overflow | +∞ | VML_STATUS_OVERFLOW | OVERFLOW | 
| X < underflow | +0 | VML_STATUS_UNDERFLOW | UNDERFLOW | 
| +∞ | +∞ | ||
| -∞ | +0 | ||
| QNAN | QNAN | ||
| SNAN | QNAN | INVALID | 
See Special Value Notations for the conventions used in the table below.
RE(z) i·IM(z)  |  
        -∞ 
  |  
        -X 
  |  
        -0 
  |  
        +0 
  |  
        +X 
  |  
        +∞ 
  |  
        NAN 
  |  
       
|---|---|---|---|---|---|---|---|
+i·∞ 
  |  
        +0+i·0 
  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        +∞+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
       
| +i·Y | +0·CIS(Y) | +∞·CIS(Y) | QNAN+i·QNAN | ||||
| +i·0 | +0·CIS(0) | +1+i·0 | +1+i·0 | +∞+i·0 | QNAN+i·0 | ||
| -i·0 | +0·CIS(0) | +1-i·0 | +1-i·0 | +∞-i·0 | QNAN-i·0 | ||
| -i·Y | +0·CIS(Y) | +∞·CIS(Y) | QNAN+i·QNAN | ||||
-i·∞ 
  |  
        +0-i·0 
  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        +∞+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
       
+i·NAN  |  
        +0+i·0  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        QNAN+i·QNAN INVALID  |  
        +∞+i·QNAN  |  
        QNAN+i·QNAN  |  
       
Notes:
raises the INVALID exception when real or imaginary part of the argument is SNAN
raises the INVALID exception on argument z=-∞+i·QNAN
raises the OVERFLOW exception and sets the VM Error Status to VML_STATUS_OVERFLOW in the case of overflow, that is, when both RE(z) and IM(z) are finite non-zero numbers, but the real or imaginary part of the exact result is so large that it does not meet the target precision.