HP MLIB User's Guide Vol. 1 7th Ed.

92 HP MLIB User’s Guide
SFRAC/DFRAC Extract fractional parts
Name SFRAC/DFRAC
Extract fractional parts
Purpose Given a real vector x of length n, these subprograms extract the fractional
portions of the elements of x and return them in a vector y.
The vectors can be stored in one-dimensional arrays or in either rows or
columns of two-dimensional arrays. Indexing through the arrays can be either
forward or backward.
Usage VECLIB:
INTEGER*4 n, incx, incy
REAL*4 x(lenx), y(leny)
CALL SFRAC(n, x, incx, y, incy)
INTEGER*4 n, incx, incy
REAL*8 x(lenx), y(leny)
CALL DFRAC(n, x, incx, y, incy)
VECLIB8:
INTEGER*8 n, incx, incy
REAL*4 x(lenx), y(leny)
CALL SFRAC(n, x, incx, y, incy)
INTEGER*8 n, incx, incy
REAL*8 x(lenx), y(leny)
CALL DFRAC(n, x, incx, y, incy)
Input n Number of elements of vectors x and y to be used. If
n 0, the subprograms do not reference x or y.
x Array of length lenx = (n1)×|incx|+1 containing the
n-vector x.
incx Increment for the array x:
incx 0 x is stored forward in array x; that is,
x
i
is stored in x((i1)×incx+1).
incx < 0 x is stored backward in array x; that
is, x
i
is stored in x((in)×incx+1).
Use incx = 1 if the vector x is stored contiguously in
array x; that is, if x
i
is stored in x(i). Refer to “BLAS
Indexing Conventions” in the introduction to this
chapter.
incy Increment for the array y, incy 0: