Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VSQRT(3DXML)  —  Subroutines

Digital

Name

vsqrt − Vector square root

FORMAT

VSQRT (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 sqrt(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 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. 

Example

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.
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026