These subroutines perform a quadratic interpolation at specified points in
the vector x, using initial linear displacement in the samples
s, sample interval g, output scaling parameter OMEGA, and
sample reflection times in vector t. The result is returned
in vector y.
| x, s, g, OMEGA, t, y | Subroutine |
|---|---|
| Short-precision real | SQINT |
| Long-precision real | DQINT |
| Fortran | CALL SQINT | DQINT (s, g, omega, x, incx, n, t, inct, y, incy, m) |
| C and C++ | sqint | dqint (s, g, omega, x, incx, n, t, inct, y, incy, m); |
| PL/I | CALL SQINT | DQINT (s, g, omega, x, incx, n, t, inct, y, incy, m); |
The quadratic interpolation, which is expressed as follows:

uses the following values:
and where trace, k, f, and w are four working vectors, and so is a working scalar defined as:
If n or m is 0, no computation is performed.
SQINT provides the same function as the IBM 3838 function INT, with restrictions removed. DQINT provides a long-precision computation that is not included in the IBM 3838 functions. See the IBM 3838 Array Processor Functional Characteristics manual.
The condition (ki+1 > n) or (ki+1 <= 2) has occurred, where n is the number of elements in vector x. See Function for how to calculate ki.
This example shows a quadratic interpolation, using vectors with strides of 1.
S G OMEGA X INCX N T INCT Y INCY M
| | | | | | | | | | |
CALL SQINT( 2.0 , 1.0 , 1.0 , X , 1 , 8 , T , 1 , Y , 1 , 4 )
X = (1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0)
T = (1.5, 2.5, 3.5, 4.5)
Y = (9.0, 11.0, 13.0, 15.0)
This example shows a quadratic interpolation, using vectors with a positive stride of 1 and negative strides of -1.
S G OMEGA X INCX N T INCT Y INCY M
| | | | | | | | | | |
CALL SQINT( 2.0 , 1.0 , 1.0 , X , -1 , 8 , T , -1 , Y , 1 , 4 )
X = (1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0)
T = (1.5, 2.5, 3.5, 4.5)
Y = (3.0, 5.0, 7.0, 9.0)
This example shows a quadratic interpolation, using vectors with a positive stride greater than 1 and negative strides less than -1.
S G OMEGA X INCX N T INCT Y INCY M
| | | | | | | | | | |
CALL SQINT( 2.0 , 1.0 , 1.0 , X , -2 , 8 , T , -1 , Y , 2 , 4 )
X = (1.0, . , 3.0, . , 5.0, . , 7.0, . , 9.0, . , 11.0, . ,
13.0, . , 15.0)
T = (1.36, 2.36, 3.36, 4.36)
Y = (4.56, . , 8.56, . , 12.56, . , 16.56)
This example shows a quadratic interpolation, using vectors with positive strides and larger values for S and G than shown in the previous examples.
S G OMEGA X INCX N T INCT Y INCY M
| | | | | | | | | | |
CALL SQINT( 3.0 , 10.0 , 1.0 , X , 1 , 8 , T , 2 , Y , 3 , 4 )
X = (1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0)
T = (1.5, . , 2.5, . , 3.5, . , 4.5)
Y = (8.3, . , . , 8.5, . , . , 8.7, . , . , 8.9)