cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cc cc cc mnspal : spalde test program cc cc evaluation of a spline function through its polynomial cc cc representation in each knot interval. cc cc cc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc real x(21),y(21),t(20),c(20),d(6),cof(6) integer i,i1,i2,ier,j,jj,k,k1,l,l1,m,n,nk1 real ai,aj,arg,fac,pol,tt,xx c set up the points where the splines will be evaluated. m = 21 do 10 i=1,m ai = i-1 x(i) = ai*0.5e-01 10 continue c main loop for the different spline degrees. do 100 k=3,5,2 k1 = k+1 c n denotes the total number of knots. n = 2*k1+4 c set up the knots of the spline j = n c the boundary knots do 20 i=1,k1 t(i) = 0. t(j) = 0.1e+01 j = j-1 20 continue c the interior knots t(k1+1) = 0.1e+0 t(k1+2) = 0.3e+0 t(k1+3) = 0.4e+0 t(k1+4) = 0.8e+0 c generate the b-spline coefficients. nk1 = n-k1 do 30 i=1,nk1 ai = i c(i) = 0.1e-01*ai*(ai-0.5e01) 30 continue c print the data for the spline. write(6,900) k write(6,905) write(6,910) (t(i),i=1,n) write(6,915) write(6,920) (c(i),i=1,nk1) l = k l1 = k1 c main loop for the different points of evaluation. do 80 i=1,m arg = x(i) c search for knot interval t(l)<=x(i)