VEXP(3DXML) — Subroutines
Digital
Name
vexp − Vector exponential
FORMAT
VEXP (x, incx, y, incy, n)
Arguments
xreal∗8
On entry, a one-dimensional array X of length at least (1+(n-1)∗incx), containing the elements of the vector x.
On exit, x is unchanged.
incxinteger∗4
On entry, the increment for the array X. As incx > 0, vector x is stored forward in the array, so that x(i) is stored in location X(1+(i-1)∗incx).
On exit, incx is unchanged.
yreal∗8
On entry, a one-dimensional array Y of length at least (1+(n-1)∗incy).
On exit, if n <= 0, y is unchanged. If n > 0, y is overwritten; y(i) is replaced by exp(x(i)).
incyinteger∗4
On entry, the increment for the array Y. As incy > 0, vector y is stored forward in the array, so that y(i) is stored in location Y(1+(i-1)∗incy).
On exit, incy is unchanged.
ninteger∗4
On entry, the number of elements to process.
On exit, n is unchanged.
Description
The VEXP function computes the exponential of n elements of a vector as follows:
y(i) = exp(x(i))
where x and y are vectors.
Example
INTEGER∗4 N, INCX, INCY
REAL∗8 X(20), Y(20)
INCX = 1
INCY = 1
N = 20
CALL VEXP(X,INCX,Y,INCY, N)
This FORTRAN code shows how the exponential of all elements of the real vector x is obtained and set equal to the corresponding elements of the vector y.