E02BCF has not yet been replaced anywhere. Thus the migration hints given here may contain errors or may be based on misunderstandings.
The equivalent of this routine in SLATEC is PDA_DBVALU. Several calls are necessary, one for each derivative. For the function value itself set the number of derivative to zero. The order is K = 4 for a cubic spline. The NAG code would look like
INTEGER LEFT, N, IFAIL
DOUBLE PRECISION T(N+7), C(N+7), X, S(O:3)
IFAIL = 1
CALL E02BCF( N+7, T, C, X, LEFT, S, IFAIL )
IF ( IFAIL .NE. 0 ) THEN
An error has occurred
END IF
Here N, T and C are the same as in E02BAF. If T and C originate from a call to E01BAF then for N+7 read M+4 with M the number of data points given to the interpolation. S(I) returns the I-th derivative. In the case that X coincides with a knot and the derivatives are not continuous at that knot, LEFT is used to decide which side of the knot to use.
PDA_DBVALU is a function rather than a subroutine. The dimension passed to PDA_DBVALU is not that of T, but that of C, i.e. N+3 (or M after interpolation). PDA_DBVALU returns the value of any derivative, as specified in the fifth argument.
There is no equivalent to the LEFT parameter in NAG. PDA_DBVALU returns right limiting values, except at the right end point.
INVB must be given 1 in the first call. For several evaluations of the same spline it should not be changed between calls. It is changed by PDA_DBVALU. So if PDA_DBVALU is called in a DO loop, the statement INVB = 1 is typically before and outside the loop. In the code below, IFAIL is reset inside the DO loop. Assuming that an error will quit the loop, the IFAIL = 0 statement could be before and outside the DO loop as well.
INTEGER INVB, I, K, N
PARAMETER ( K = 4 )
DOUBLE PRECISION T(N+K+3), C(N+3), X, S(0:K-1)
DOUBLE PRECISION WORK(3*K)
DOUBLE PRECISION PDA_DBVALU
INVB = 1
DO 1 I = 0, K-1
IFAIL = 0
S(I) = PDA_DBVALU( T, C, N+3, K, I, X, INVB, WORK, IFAIL )
IF ( IFAIL .NE. 0 ) THEN
An error has occurred
END IF
1 CONTINUE
PDA [1ex