2 SUBROUTINE dpchim (N, X, F, D, INCFD, IERR)
140 INTEGER N, INCFD, IERR
141 DOUBLE PRECISION X(*), F(incfd,*), D(incfd,*)
146 DOUBLE PRECISION DEL1, DEL2, DMAX, DMIN, DRAT1, DRAT2, DSAVE,
147 * h1, h2, hsum, hsumt3, three, w1, w2, zero
149 DOUBLE PRECISION DPCHST
150 DATA zero /0.d0/, three/3.d0/
155 IF ( n.LT.2 ) go
to 5001
156 IF ( incfd.LT.1 ) go
to 5002
158 IF ( x(i).LE.x(i-1) ) go
to 5003
166 del1 = (f(1,2) - f(1,1))/h1
171 IF (nless1 .GT. 1) go
to 10
180 del2 = (f(1,3) - f(1,2))/h2
186 w1 = (h1 + hsum)/hsum
188 d(1,1) = w1*del1 + w2*del2
189 IF ( dpchst(d(1,1),del1) .LE. zero)
THEN
191 ELSE IF ( dpchst(del1,del2) .LT. zero)
THEN
194 IF (
abs(d(1,1)) .GT.
abs(dmax)) d(1,1) = dmax
200 IF (i .EQ. 2) go
to 40
206 del2 = (f(1,i+1) - f(1,i))/h2
212 IF ( dpchst(del1,del2) .LT. 0.) go
to 42
213 IF ( dpchst(del1,del2) .EQ. 0.) go
to 41
219 IF (del2 .EQ. zero) go
to 50
220 IF ( dpchst(dsave,del2) .LT. zero) ierr = ierr + 1
232 hsumt3 = hsum+hsum+hsum
233 w1 = (hsum + h1)/hsumt3
234 w2 = (hsum + h2)/hsumt3
239 d(1,i) = dmin/(w1*drat1 + w2*drat2)
247 w2 = (h2 + hsum)/hsum
248 d(1,n) = w1*del1 + w2*del2
249 IF ( dpchst(d(1,n),del2) .LE. zero)
THEN
251 ELSE IF ( dpchst(del1,del2) .LT. zero)
THEN
254 IF (
abs(d(1,n)) .GT.
abs(dmax)) d(1,n) = dmax
267 CALL
xermsg(
'SLATEC',
'DPCHIM',
268 +
'NUMBER OF DATA POINTS LESS THAN TWO', ierr, 1)
274 CALL
xermsg(
'SLATEC',
'DPCHIM',
'INCREMENT LESS THAN ONE', ierr,
281 CALL
xermsg(
'SLATEC',
'DPCHIM',
282 +
'X-ARRAY NOT STRICTLY INCREASING', ierr, 1)
subroutine dpchim(N, X, F, D, INCFD, IERR)
may be zero for pure relative error test tem the relative tolerance must be greater than or equal to
charNDArray max(char d, const charNDArray &m)
subroutine xermsg(LIBRAR, SUBROU, MESSG, NERR, LEVEL)
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
charNDArray min(char d, const charNDArray &m)