Go to the documentation of this file.
198 FUNCTION simpsn (X,Y,NUM,IER)
272 REAL x(num) ,y(num) ,
simpsn, simpne
273 real*8 del(3) ,
pi(3) ,g(3)
274 real*8 third, half, two3r, e,
f, feints, delprd
277 DATA third,half,two3r/0.333333333333333,0.5,0.666666666666666/
279 IF (num .GT. 2)
GO TO 101
286 IF (mod(num,2) .EQ. 0) n = num-1
287 simpsn = half*(y(1)+y(n))+2.*y(n-1)
288 IF (n .EQ. 3)
GO TO 103
294 IF (mod(num,2) .EQ. 1)
RETURN
310 entry simpne(x,y,num,ier)
314 IF (num .GT. 2)
GO TO 104
327 f = x3*x3*x3-x1*x1*x1
338 delprd = del(1)*del(2)*del(3)
341 ssum = ssum+y(n-1+i)*del(i)*(third*
f-g(i)*half*e+
pi(i)*feints)
345 IF (num .GT. (n+1))
GO TO 105
346 IF (mod(num,2) .NE. 0)
RETURN
352 f = x3*x3*x3-x2*x2*x2
363 delprd = del(1)*del(2)*del(3)
366 ssum = ssum+y(n-1+i)*del(i)*(third*
f-g(i)*half*e+
pi(i)*feints)
real function simpsn(X, Y, NUM, IER)