HP MLIB User's Guide Vol. 2 7th Ed.
798 HP MLIB User’s Guide
vcos_sin The cosine and sine of the elements of a vector with variable increments
Name vcos_sin
The cosine and sine of the elements of a vector with variable increments
Purpose vcos_sin calculates both the cosine and sine functions of vector elements:
y(1+(i-1)*incy) = cos(x(1+(i-1)*incx)), and
z(1+(i-1)*incy) = sin(x(1+(i-1)*incx)), for i=1 to n
Usage The Fortran include file math.fi declares an interface for this subroutine,
suitable for both VMATH and VMATH8. The interface is compatible with
Tru64 CXML (Compaq Extended Math Library).
The C include files vmath.h (for VMATH) and vmath8.h (for VMATH8) declare
prototypes for vcos_sin. The vmath.h header uses type int* for integer
parameters of vcos_sin. The vmath8.h header uses type long long*.
SUBROUTINE vcos_sin(x, incx, y, incy, z, incz, n)
INTEGER, INTENT(IN) :: incx, incy, incz, n
REAL (KIND=8), DIMENSION(n), INTENT(IN) :: x
REAL (KIND=8), DIMENSION(n), INTENT(OUT):: y, z
Input x Array of length at least 1+(n-1)*incx containing the
elements of the input vector.
incx Positive increment for input vector stored (forward) in
array x.
incy Positive increment for output vector stored (forward) in
array y.
incz Positive increment for output vector stored (forward) in
array z.
n Number of elements to be calculated.
Output y Array of length at least 1+(n-1)*incy receiving the
elements of the output vector of cosines.
z Array of length at least 1+(n-1)*incy receiving the
elements of the output vector of sines.