VSQRT (x, incx, y, incy, n)
x real*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. incx integer*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. y real*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 sqrt(x(i)). incy integer*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. n integer*4 On entry, the number of elements to process. On exit, n is unchanged.
The VSQRT function computes the square root of n elements of a vector as follows: y(i) = sqrt(x(i)) where x and y are vectors.
INTEGER*4 N, INCX, INCY REAL*8 X(20), Y(20) INCX = 1 INCY = 1 N = 20 CALL VSQRT(X,INCX,Y,INCY, N) This FORTRAN code shows how the square root of all elements of the real vector x is obtained and set equal to the corresponding elements of the vector y.