procedure VANDER(X:array of real;var W:array of real; Q:array of real; N:integer); const NMAX = 100; ZERO = 0; ONE = 1; var C:array[0..100] of real; I,J,K,K1:integer; XX,T,B,S:real; begin If N = 1 Then W[1]:=Q[1] Else begin For I:=1 To N do C[I]:=ZERO; C[N]:=-X[1]; For I:=2 To N do begin XX:=-X[I]; For J:=N + 1 - I To N - 1 do C[J]:=C[J] + XX * C[J + 1]; C[N]:=C[N] + XX; end; For I:=1 To N do begin XX:=X[I]; T:=ONE; B:=ONE; S:=Q[N]; K:=N; For J:=2 To N do begin K1:=K - 1; B:=C[K] + XX * B; S:=S + Q[K1] * B; T:=XX * T + B; K:=K1; end; W[I]:=S / T; end; end; end;